Skip to content

Conversation

@ymmot239
Copy link
Contributor

Added 5 different test puzzles.

Puzzles can be done a black or white, and it will show the current side in the top corner.

The puzzle will automatically undo when a wrong move is taken, and update the spectators when the correct move is made.

Additional puzzles can be added to puzzles.json if needed

ymmot239 and others added 21 commits October 18, 2024 16:57
moving computers.
created most of the setup page
Need to create the server response to client moves.
code update for puzzle framework
…o 179-server-create-chess-puzzle-framework
For use with the puzzle framework
Added game ended, set chess, and puzzle solved messages for notifying client of puzzle progress.
Created a puzzles.json for saving puzzles in server.
Removed extra puzzle files and print statements.
Added some comments for readability
Ran prettier
Added the puzzle difficulty rating to the nav bar for reference.
ran prettier
made the difficulty rating only appear during puzzle games, and null for others.
added a 2915 rated 7 step puzzle
rotation hotfix
Messed up importing in apis
Added back simulator and puzzle messages.
Added support for spectators to view puzzle and Ai games.
This required a 1 second delay, so the games feel a bit weird, but they work.
Without it, the spectators would error because they had too many move commands at once.
Added another 1000ish elo puzzle to puzzles.json
changed handle message to match new Arduino changes
@ymmot239 ymmot239 linked an issue Mar 24, 2025 that may be closed by this pull request
ymmot239 and others added 2 commits March 24, 2025 17:52
Copy link
Member

@democat3457 democat3457 left a comment

Choose a reason for hiding this comment

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

Also I need to test the branch

@democat3457
Copy link
Member

Test looks fine, waiting on comments to be resolved

Comment on lines 74 to 77
const [gameInterruptedReason, setGameInterruptedReason] =
useState<GameInterruptedReason>();
const [gameEndedReason, setGameEndedReason] = useState<GameEndReason>();
const [gameHoldReason, setGameHoldReason] = useState<GameHoldReason>();
Copy link
Member

Choose a reason for hiding this comment

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

Not your problem to handle in this PR, but since I am looking at this code consciously, in general it would be nice to store all these reasons in one state hook and union the types. my current assumption is that there should only be one of a interrupted/ended/hold reason at a given time. if my assumption is wrong this is a useless comment :)

@jasonappah jasonappah enabled auto-merge (squash) May 13, 2025 03:40
@jasonappah jasonappah merged commit deafe91 into main May 13, 2025
5 checks passed
@jasonappah jasonappah deleted the 179-server-create-chess-puzzle-framework branch May 13, 2025 03:40
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.

Server: Create chess puzzle framework

4 participants