Skip to content

Commit

Permalink
Fix terrain color when ctrl+Z
Browse files Browse the repository at this point in the history
  • Loading branch information
RheingoldRiver committed Oct 5, 2023
1 parent c67e9e8 commit cf6871e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Cell/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const Cell = ({
}
function backgroundColor() {
if (cell.conflict === true && hasPentomino === true) return { class: "bg-red-700", style: "" };
if (cell.pentomino.pentomino === PENTOMINOES.R) return { class: "bg-gray-600", style: "" };
if (cell.pentomino.pentomino.name === PENTOMINOES.R.name) return { class: "bg-gray-600", style: "" };
if (hasPentomino === true)
return { class: "", style: displayColors[pentominoColors[cell.pentomino.pentomino.name]] };
return { class: "bg-gray-400 dark:bg-gray-800", style: "" };
Expand Down
2 changes: 1 addition & 1 deletion src/components/GameStateProvider/urlConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ export function deserializeUrl(s: string): UrlConfig {
x: x,
y: y,
};
ret.colors[p.p.toUpperCase()] = decodeColor(r.color, p.p, legacy);
if (p.p.toUpperCase() !== PENTOMINOES.R.name) ret.colors[p.p.toUpperCase()] = decodeColor(r.color, p.p, legacy);
});
return ret;
}

0 comments on commit cf6871e

Please sign in to comment.