-
Notifications
You must be signed in to change notification settings - Fork 4
179 server create chess puzzle framework #210
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
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
left a comment
There was a problem hiding this 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
|
Test looks fine, waiting on comments to be resolved |
…ss-puzzle-framework
| const [gameInterruptedReason, setGameInterruptedReason] = | ||
| useState<GameInterruptedReason>(); | ||
| const [gameEndedReason, setGameEndedReason] = useState<GameEndReason>(); | ||
| const [gameHoldReason, setGameHoldReason] = useState<GameHoldReason>(); |
There was a problem hiding this comment.
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 :)
updated the create robot functions to work with indices and made puzzles materialize and execute the paths it makes
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