Skip to content

Rewrite app as a lightweight Snake game and remove prime-checker#215

Open
tomadowley wants to merge 1 commit intomasterfrom
cosine/rewrite-app-as-snake-game
Open

Rewrite app as a lightweight Snake game and remove prime-checker#215
tomadowley wants to merge 1 commit intomasterfrom
cosine/rewrite-app-as-snake-game

Conversation

@tomadowley
Copy link
Owner

This PR replaces the old Prime Checker UI with a self-contained Snake game.

What changed:

  • App now renders a new SnakeGame component instead of PrimeChecker and removes the old logo usage.
  • Added SnakeGame.tsx: a canvas-based snake game with arrow-key controls, Space to pause, R to restart, and a score display. It includes a game-over overlay and accessible score labeling. Test IDs and ARIA attributes added to support tests (snake-canvas, start-btn, pause-btn, restart-btn, and aria-label on the score element).
  • Updated tests:
    • src/App.test.tsx now tests for the snake game UI (score label, start/pause/restart controls) instead of prime checker text.
  • Removed old PrimeChecker component and its tests, along with isPrime logic and PrimeChecker.test.tsx.
  • Cleaned up related files by deleting PrimeChecker.tsx and associated test suites.

How it solves the task:

  • Rewrites the app to a fun, interactive Snake game while keeping a clean, self-contained component. It removes the previous prime-checking functionality and related tests, aligning the project with the new feature goal.

This pull request was co-created with Cosine Genie

Original Task: sorbox/wr2e9snq7fpx
Author: Tom Dowley

…er/isPrime code and tests, add SnakeGame and updated tests

Co-authored-by: Genie <genie@cosine.sh>
@vercel
Copy link

vercel bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sorbox Ready Ready Preview Comment Dec 4, 2025 3:30pm

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.

1 participant