How jamesmcaleer/horseracing works
Horse Racing is a Pygame horse-racing simulator. The player generates a field, starts and watches a race, then sees the top-three podium; the documented controls also allow replay and return to the menu. Its domain stages are odds and speed assignment, horse assembly, race presentation, ranking, and finish results. The excerpts show the main runtime classes but omit some wiring and rendering details, so uncertain connections are left out; the README supports the asset and podium capabilities.
Main entry points: main.py Graphics handler · assets Horse assets
Components 10
Race generation
- Chance handler
main.py - Action handler
main.py - Horse
main.py - Horse assets
assets
Race presentation
- Graphics handler
main.py - Finish line
main.py
Race results
- Leaderboard
main.py - Podium
main.py
Other components
- Player
- Pygame
Connections 13
- Player → Graphics handler: controls
- Graphics handler → Pygame: polls events
- Action handler → Chance handler: generates odds
- Action handler → Chance handler: generates speeds
- Action handler → Horse: creates horses
- Action handler → Horse assets: fetches assets
- Graphics handler → Action handler: updates field
- Graphics handler → Finish line: moves and draws
- Graphics handler → Leaderboard: draws ranking
- Leaderboard → Action handler: reads horses
- Podium → Action handler: reads ranked horses
- Graphics handler → Podium: draws podium
- Graphics handler → Pygame: renders display