Skip to content

style: polish wooden board and piece materials for a natural boardgame look#2

Open
TempoTian wants to merge 2 commits intomainfrom
codex/create-a-push-chess-game-iy0igt
Open

style: polish wooden board and piece materials for a natural boardgame look#2
TempoTian wants to merge 2 commits intomainfrom
codex/create-a-push-chess-game-iy0igt

Conversation

@TempoTian
Copy link
Owner

Motivation

  • The previous wood texture was reported as too rough/noisy and visually inconsistent with a typical chess/board-game aesthetic.
  • The goal is to provide a cleaner, warmer, and more natural-looking board and piece materials to improve clarity and user experience while keeping existing interactions intact.

Description

  • Reworked the board material in styles.css to use softer wood gradients, subtler grain layering, increased border depth, and refined inset/drop shadows for a tabletop look.
  • Tuned grid line color and opacity and adjusted node hotspot styling so lines and intersection dots harmonize with the warmer board tone.
  • Updated black/white piece materials in styles.css to improve highlights, shadowing, and subtle texture layers so pieces appear polished and legible, and preserved the existing hint/selection visual styles.
  • Kept script.js logic unchanged and ensured the new styles integrate with the rule-selection hints and UI elements defined in index.html and styles.css.

Testing

  • Ran node --check script.js which completed with no syntax errors (passed).
  • Served the app using python3 -m http.server 4173 and confirmed the page assets loaded successfully (passed).
  • Ran a Playwright script to open the page and capture a screenshot (wood-style-optimized.png) for visual verification (screenshot produced).

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 625cbd21ce

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +560 to +563
function handleMovementClick(r, c, player) {
if (!state.selectedPiece) {
if (state.board[r][c] !== player) return;
state.selectedPiece = [r, c];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve blocked human turns during movement phase

When it is the human player's turn in movement, handleMovementClick only supports selecting and moving a piece; if all human pieces are immobile (no adjacent empty node), there is no fallback path to pass/resolve the turn, so state.current stays on human and the game becomes unwinnable/stuck. This is especially visible because aiMovement already handles its own blocked case, so the deadlock is specific to human turns and can occur on reachable board states where the human still has pieces but no legal moves.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments