You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Classic Pac‑Man mechanics: Navigate the maze, eat food (10 points), power‑food (50 points), and bonus cherries (100 points).
Ghost behavior: Four ghosts patrol randomly, reverse on walls, and return to start when eaten in power‑food mode (+200 points).
Power‑ups: Eating a power‑food scares ghosts for 8 seconds—ghosts change appearance and can be eaten.
Cherry spawn/animation: Periodic bonus cherries spawn every 10 seconds on random food tiles, alternating between two images for a simple animation effect.
Screen wrap-around: Exiting left/right edges teleports Pac‑Man to the opposite side seamlessly.
Game states:
Playing: Default state; HUD shows lives and score.
Paused: Press P to pause/resume. Semi‑transparent overlay + “PAUSED” text.
Game Over: After losing all lives, game halts. Overlay displays “GAME OVER” + final score, and the restart hint.
🔄 Programming Paradigms & Techniques
OOP Principles: Encapsulation (Block class), single-responsibility methods (loadMap, move, draw), and separation of concerns between rendering, input, and logic.
Data Structures: HashSet<Block> for efficient tracking and removal of dynamic entities.