Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piece moving in frontend and engine #4

Merged
merged 9 commits into from
Jul 31, 2023
Merged

Piece moving in frontend and engine #4

merged 9 commits into from
Jul 31, 2023

Conversation

jamespeilunli
Copy link
Contributor

@jamespeilunli jamespeilunli commented Jul 26, 2023

minimal functionality

  • allow user to move/capture pieces with click and drag
  • when user moves a piece, send the move to the engine
    • call a wasm function that returns a random legal move -- we havent implemented the search yet
  • update the board state with the engine output
  • support promotion

stretch goal

  • check if a move is valid
  • prevent player from moving black pieces
  • disallow player to move twice in a row (before engine has a chance to move)
  • eval bar (display the engine's evaluation of the position)
  • determines when someone wins/draws/loses? (maybe for engine)
  • make promotion piece selector look pretty + pop up when user attempts to promote

@spierceVR spierceVR linked an issue Jul 27, 2023 that may be closed by this pull request
14 tasks
@jamespeilunli
Copy link
Contributor Author

turns out only allowing legal moves ("check if a move is valid") also prevents the player from moving the black pieces

Copy link
Collaborator

@spierceVR spierceVR left a comment

Choose a reason for hiding this comment

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

LGTM

@jamespeilunli jamespeilunli merged commit 0237ad6 into main Jul 31, 2023
@jamespeilunli jamespeilunli deleted the move-pieces branch July 31, 2023 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chess board front end
2 participants