Skip to content

Add Pacman mini-game#1

Open
imMatheus wants to merge 1 commit into
mainfrom
pacman-game
Open

Add Pacman mini-game#1
imMatheus wants to merge 1 commit into
mainfrom
pacman-game

Conversation

@imMatheus
Copy link
Copy Markdown
Owner

Summary

  • Adds a new Pacman mini-game (codex-rs/tui/src/games/pacman.rs) alongside the existing mini-games (Flappy Bird, Wordle, Snake, Tetris, Connect 4, Subway Surfer).
  • 21x13 maze with regular pellets, four power pellets, and three ghosts that chase Pacman, flee when scared, and respawn after being eaten.
  • Wires the new variant through MiniGameKind (core config), the game instantiation match, the config-persistence key in app.rs, and the game picker list in chatwidget.rs.

Gameplay

  • Arrow keys or WASD to move.
  • Eat all pellets to win; touching a non-scared ghost ends the run.
  • Power pellets (◉ in the four corners) scare the ghosts for ~7s — run them over for 200 points each. They flash near the end of the timer and respawn at their home tile after being eaten.
  • Direction-aware Pacman glyph (◐ / ◑ / ◒ / ◓) and per-ghost colors.

Test plan

  • cargo check -p codex-tui passes
  • cargo test -p codex-tui --lib games::pacman — all 5 unit tests pass (spawn, pellet consumption, wall blocking, ghost collision, power pellet scaring ghosts)
  • cargo clippy -p codex-tui --lib --no-deps clean for the new file
  • Launch the TUI, open the mini-game picker, select "Pacman", and verify rendering/input while the agent is running

Adds a new Pacman mini-game with a 21x13 maze, four power pellets,
three chasing ghosts with scared/flee behavior after power pellets,
direction-aware Pacman glyph, and win/lose/retry states.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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