Skip to content

Add Minesweeper game to the arcade#6

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/add-minesweeper-game
Draft

Add Minesweeper game to the arcade#6
Copilot wants to merge 2 commits intomasterfrom
copilot/add-minesweeper-game

Conversation

Copy link
Contributor

Copilot AI commented Mar 4, 2026

Adds a fully-featured Minesweeper game to the arcade alongside Snake, 2048, Tetris, and Flappy Bird.

Changes Made

  • src/components/MinesweeperGame.tsx — New game component with:
    • 3 difficulty levels: Beginner (9×9, 10 mines), Intermediate (16×16, 40 mines), Expert (30×16, 99 mines)
    • Safe first click — mines are placed after the first click, avoiding the clicked cell and its neighbors
    • Left-click to reveal, right-click to flag 🚩, chord-click to auto-reveal neighbors
    • BFS flood-fill auto-reveal for zero-adjacent-mine cells
    • Live timer (starts on first click, freezes on win/loss)
    • Mine counter and smiley face reset button (😊 / 😎 won / 😵 lost)
    • Number coloring (1=blue, 2=green, 3=red, etc.) and full mine reveal on loss
    • Keyboard shortcuts: R = reset, N = cycle difficulty
    • Full accessibility: role="application", per-cell aria-label, aria-live status region
  • src/components/MinesweeperGame.test.tsx — 7 unit tests (render, mine counter, reset button, grid cells, flag placement)
  • src/App.tsx — Added "minesweeper" view type, import, callback, and render block
  • src/components/Home.tsx — Added purple 💣 arcade cabinet navigation card

Screenshots

Home screen with Minesweeper card:
Home screen

Minesweeper game (Beginner 9×9):
Minesweeper game

Testing

  • npm run build — 0 TypeScript errors
  • npm run lint — 0 warnings
  • npm run test:run — 7/7 tests pass
Original prompt

Add a minesweeper game to the arcade

The user has attached the following file paths as relevant context:

  • .github\copilot-instructions.md

Created from VS Code.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@cwebster-99
Copy link
Owner

@copilot The PR doesnt show any files changes. commit the added files to the branch for review

Co-authored-by: cwebster-99 <60238438+cwebster-99@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 4, 2026

@copilot The PR doesnt show any files changes. commit the added files to the branch for review

Done — all files are now committed in 4b904c9.

Home screen (Minesweeper card visible below Flappy Bird):
Home screen

Minesweeper game (Beginner 9×9, mine counter, timer, difficulty selector):
Minesweeper game

Files added/changed:

  • src/components/MinesweeperGame.tsx — full game (safe first click, flood fill, flagging, chord click, timer, 3 difficulties)
  • src/components/MinesweeperGame.test.tsx — 7 unit tests
  • src/App.tsx — added "minesweeper" route
  • src/components/Home.tsx — added purple 💣 arcade cabinet card

Copilot AI changed the title [WIP] Add minesweeper game to the arcade Add Minesweeper game to the arcade Mar 4, 2026
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.

2 participants