179 server create chess puzzle framework#210
Merged
jasonappah merged 34 commits intomainfrom May 13, 2025
Merged
Conversation
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
…thub.com/Comet-Robotics/chessBot into 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.
prettier
Added another 1000ish elo puzzle to puzzles.json
changed handle message to match new Arduino changes
democat3457
reviewed
Apr 9, 2025
democat3457
reviewed
Apr 9, 2025
Member
democat3457
left a comment
There was a problem hiding this comment.
Also I need to test the branch
Member
|
Test looks fine, waiting on comments to be resolved |
…ss-puzzle-framework
jasonappah
requested changes
May 12, 2025
Comment on lines
74
to
77
| const [gameInterruptedReason, setGameInterruptedReason] = | ||
| useState<GameInterruptedReason>(); | ||
| const [gameEndedReason, setGameEndedReason] = useState<GameEndReason>(); | ||
| const [gameHoldReason, setGameHoldReason] = useState<GameHoldReason>(); |
Member
There was a problem hiding this comment.
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 :)
updated the create robot functions to work with indices and made puzzles materialize and execute the paths it makes
jasonappah
approved these changes
May 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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