How dtschust/javapacman works
This is a desktop Pac-Man game: a player starts or watches the game, controls Pac-Man with the arrow keys, and plays through pellet collection, ghost encounters, and win/loss states. Pacman.java owns the window, input handling, and timed frame progression; Board.java contains most game state, movement, and drawing, while GameSounds.java handles effects. Board.java also reads and writes the high-score file. The excerpts show these main responsibilities, but do not expose every Board-to-sound call or the use of image assets, so those links are omitted.
Main entry points: Pacman.java Window and controls · Board.java Board and rendering · highScores.txt High-score file · GameSounds.java Sound effects
Components 6
Game interface
- Window and controls
Pacman.java
Game simulation
- Board and rendering
Board.java - Player and ghosts
Board.java
Game records
- High-score file
highScores.txt
Sound effects
- Sound effects
GameSounds.java
Other components
- Player
Connections 5
- Player → Window and controls: starts and controls
Pacman.java - Window and controls → Board and rendering: advances frames
Pacman.java - Window and controls → Player and ghosts: moves and resets
Pacman.java - Window and controls → Sound effects: stops demo audio
Pacman.java - Board and rendering → High-score file: reads and writes
Board.java