How ac-unefm/snake-game works
Snake Classic is a self-contained browser game: the player starts attempts and steers the snake, the game loop advances play and progressive difficulty, and Canvas rendering presents the board. Five-attempt sessions feed a results panel with per-attempt metrics; the best score is persisted in localStorage. The README places all runtime responsibilities in index.html and documents keyboard, touch, responsive layout, dark-mode, and accessibility capabilities. Relationships below reflect those documented responsibilities; source excerpts were not provided, so internal call details cannot be verified.
Main entry points: index.html Game loop and rules
Components 13
Gameplay
- Game loop and rules
index.html - Progressive difficulty
index.html - Canvas renderer
index.html
Interface
- Keyboard and touch controls
index.html - Responsive layout
index.html - System dark mode
index.html - Accessibility support
index.html
Sessions and results
- Five-attempt sessions
index.html - Attempt metrics
index.html - Results panel
index.html - Best score storage
index.html
Other components
- Player
- Browser localStorage
Connections 12
- Player → Keyboard and touch controls: uses
README.md - Keyboard and touch controls → Game loop and rules: steers and starts
README.md - Game loop and rules → Progressive difficulty: updates every five points
README.md - Game loop and rules → Canvas renderer: renders board
README.md - Game loop and rules → Five-attempt sessions: groups attempts
README.md - Five-attempt sessions → Attempt metrics: records per-attempt
README.md - Attempt metrics → Results panel: supplies summary
README.md - Game loop and rules → Best score storage: persists best score
README.md - Best score storage → Browser localStorage: reads and writes
README.md - Responsive layout → Canvas renderer: scales canvas
README.md - System dark mode → Player: follows system preference
README.md - Accessibility support → Player: supports accessible interaction
README.md