Commit Graph

3 Commits

Author SHA1 Message Date
callylin 3a307dbc80 Implement DAS/ARR for smooth horizontal piece movement 2026-03-24 17:59:55 -07:00
jozamudi 80f59fd3b3 Add unit and integration tests for garbage system
- Extract pure game logic functions to game-logic.js for testability
- Add Jest testing framework with 57 tests covering:
  * Unit tests for pure functions (createEmptyBoard, checkBoardOverflow, etc.)
  * Integration tests for garbage system (addGarbageToPlayer, sendGarbage)
  * Socket.io integration tests for multiplayer flow
- Refactor index.js to use extracted functions
- Tests verify garbage elimination bug fix: players only eliminated when board overflows
2026-03-21 08:55:23 +00:00
jozamudi 5da6033704 Initial commit: Tetris Battle Royale multiplayer game
Features:
- 2-8 player multiplayer via Socket.io WebSocket
- Real-time board synchronization - all players see all boards
- Battle royale mechanic: clearing rows sends garbage to opponents
- Classic Tetris gameplay with all 7 tetrominoes
- Retro visual styling with CRT scanlines and pixel font
- Automatic level progression and speed increase
- Player elimination and winner announcement

Files:
- server/index.js: Node.js + Socket.io game server
- public/js/: Frontend game logic, rendering, network, and UI
- public/css/style.css: Retro Tetris styling
- README.md: Setup and usage instructions
- PLAN.md: Implementation plan with all phases completed
2026-03-20 00:34:06 -07:00