How jlg-formation/tetris-gia works
Tetris Bisounours is a solo, keyboard-controlled browser game. The player’s input and the timed game loop are handled by the runtime controller, which updates pure game state and sends that state to canvas rendering and HUD elements. The documented gameplay spans piece movement and rotation, drops and locking, line clearing and scoring, hold and next-piece previews, and pause/restart. The excerpts show controller-to-logic and controller-to-render calls; the renderer also uses logic helpers. The HTML and stylesheet are present in the tree, but their wiring was not sampled.
Main entry points: main.js Game controller · render.js Board and previews · logic.js Game state and rules
Components 7
Game runtime
- Game controller
src/main.js - Game page
index.html - Visual styling
styles.css
Gameplay logic
- Game state and rules
src/logic.js
Canvas presentation
- Board and previews
src/render.js - Clear-line effects
src/render.js
Other components
- Player
Connections 5
- Player → Game controller: presses keys
src/main.js - Game controller → Game state and rules: updates state
src/main.js - Game controller → Board and previews: draws state
src/main.js - Game controller → Clear-line effects: updates effects
src/main.js - Board and previews → Game state and rules: reads helpers
src/render.js