How misarobison/pacman-python works
This is a small Pygame Pac-Man game. The visible workflow is: the game entry point generates a maze, creates the game engine and ghosts, accepts player movement, updates Pac-Man and pellets, and renders the board and characters. Maze generation includes a reachability check; the engine also provides ghost-move selection, though the shown main loop does not update ghost positions. The graph follows the sampled entry point and modules; no README was provided, and src/view.py is empty.
Main entry points: main.py Game entry · engine.py Game engine · constants.py Game constants · level.py Level generation
Components 8
Game loop
- Game entry
main.py - Game constants
src/constants.py
Maze and rules
- Level generation
src/level.py - Game engine
src/engine.py
Characters
- Pac-Man state
src/pacman.py - Ghost state and AI
src/ghost.py
Other components
- Player
- Pygame
Connections 14
- Player → Game entry: provides input
- Game entry → Pygame: uses events and display
- Game entry → Level generation: generates level
- Level generation → Game entry: returns grid and starts
- Game entry → Game engine: creates engine
- Game entry → Ghost state and AI: creates ghosts
- Game entry → Game engine: moves Pac-Man
- Game engine → Pac-Man state: creates and moves
- Game entry → Pygame: renders game state
- Ghost state and AI → Game engine: requests move choice
- Game engine → Game constants: reads tile and move values
- Level generation → Game constants: reads grid values
- Ghost state and AI → Game constants: reads movement values
- Game entry → Game constants: reads display and colors