Open
Conversation
- Installed react-router-dom for navigation - Created Snake game component with: - Canvas-based rendering - Arrow key controls - Collision detection - Score tracking - Pause functionality (spacebar) - Game over and restart - Added Home page with navigation - Added SnakePage wrapper - Updated App.tsx to use React Router Mentat precommit script passed. Log: https://qa.mentat.ai/gh/AbanteAI/qa-party/log/50eefdc6-2cdd-4895-8044-7285be06429c Co-authored-by: jakethekoenig <385534+jakethekoenig@users.noreply.github.com>
- Fixed bug where snake would incorrectly collide with its own tail - Added preventDefault() to arrow keys to prevent page scrolling while playing Mentat precommit script passed. Log: https://qa.mentat.ai/gh/AbanteAI/qa-party/log/184fc840-37c5-453e-8c23-39fe339ce381 Co-authored-by: jakethekoenig <385534+jakethekoenig@users.noreply.github.com>
- Added server status check back to Home page (was removed in routing refactor) - Fixed Game Over overlay to be positioned relative to canvas instead of viewport - Maintains "add, don't remove" principle from repo guidelines Mentat precommit script passed. Log: https://qa.mentat.ai/gh/AbanteAI/qa-party/log/58dd8733-d0e1-4216-a1b2-f54e67a6231f Co-authored-by: jakethekoenig <385534+jakethekoenig@users.noreply.github.com>
- Added explicit undefined type to gameLoopRef to satisfy TypeScript strict mode - useRef requires an initial value argument in strict TypeScript Mentat precommit script passed. Log: https://qa.mentat.ai/gh/AbanteAI/qa-party/log/1dfd6533-5e2c-49f7-bf82-a41b5dfea8b4 Co-authored-by: jakethekoenig <385534+jakethekoenig@users.noreply.github.com>
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.
This PR adds a playable Snake game to the Mentat Party application, making it more engaging and interactive for users.
Changes
New Features
Snake Game Component (
client/src/components/Snake.tsx)Routing System
react-router-domfor navigationclient/src/pages/Home.tsx) with game links and server statusclient/src/pages/SnakePage.tsx) with back navigationApp.tsxto use React RouterBug Fixes & Improvements
preventDefault()on arrow keys to prevent page scrolling during gameplayTechnical Details
The Snake game is now accessible at
/snakeand provides a fun, interactive experience for users visiting Mentat Party!🤖 This PR was created with Mentat. See my steps and cost here ✨