How florence-navet/minesweeper works
This is a Pygame Minesweeper application: a player launches the main menu, starts a grid game, and on victory may enter a name for a top-three record; settings and the leaderboard are alternate menu flows. The controller coordinates screens, game state, and record persistence. The README also documents difficulty/resolution settings and custom UI. Edges reflect shown imports and calls; source excerpts are partial, so deeper grid rules and unsampled menu behavior are not expanded.
Main entry points: menu_controller.py Screen controller · data_access.py Record access · game_grid.py Minesweeper grid · game_info.py Game configuration
Components 16
Game Screens
- Application launch
main.py - Main menu
view/main_menu.py - Screen controller
controller/menu_controller.py - Settings screen
view/settings_menu.py - In-game display
view/in_game_menu.py - Victory screen
view/victory_menu.py - Leaderboard screen
view/roll_of_fame.py
Game State
- Minesweeper grid
model/game_grid.py - Grid squares
model/square.py - Game configuration
model/game_info.py
Records
- Record access
model/data_access.py - Top-three records
assets/roll_of_fame.json
UI Foundation
- Menu widgets
view/menu.py - Pygame interface
view/interface.py - UI and game settings
view/__settings__.py
Other components
- Player
Connections 29
- Player → Main menu: chooses
README.md - Application launch → Main menu: starts
main.py - Main menu → Screen controller: dispatches screens
view/main_menu.py - Screen controller → Settings screen: draws settings
controller/menu_controller.py - Screen controller → Minesweeper grid: draws game
controller/menu_controller.py - Screen controller → Victory screen: draws victory
controller/menu_controller.py - Screen controller → Leaderboard screen: draws leaderboard
controller/menu_controller.py - Screen controller → Game configuration: creates state
controller/menu_controller.py - Screen controller → Record access: creates access
controller/menu_controller.py - Minesweeper grid → Grid squares: creates squares
model/game_grid.py - Minesweeper grid → In-game display: inherits display
model/game_grid.py - Screen controller → Minesweeper grid: sets grid
controller/menu_controller.py - Minesweeper grid → Game configuration: updates state
model/game_grid.py - Screen controller → Record access: checks records
controller/menu_controller.py - Victory screen → Game configuration: sets player name
view/victory_menu.py - Screen controller → Record access: saves winner
controller/menu_controller.py - Leaderboard screen → Record access: loads records
view/roll_of_fame.py - Record access → Top-three records: reads and writes
model/data_access.py - Settings screen → Game configuration: applies difficulty
view/settings_menu.py - Settings screen → Record access: receives access
controller/menu_controller.py - Main menu → Menu widgets: inherits widgets
view/main_menu.py - Settings screen → Menu widgets: inherits widgets
view/settings_menu.py - Victory screen → Menu widgets: inherits widgets
view/victory_menu.py - Leaderboard screen → Menu widgets: inherits widgets
view/roll_of_fame.py - Menu widgets → Pygame interface: inherits interface
view/menu.py - In-game display → Pygame interface: inherits interface
view/in_game_menu.py - Pygame interface → UI and game settings: uses constants
view/interface.py - Game configuration → UI and game settings: uses asset paths
model/game_info.py - Record access → UI and game settings: uses record path
model/data_access.py