A simple, modern Tetris game built with HTML5 Canvas, CSS3, and vanilla JavaScript.
- Classic Tetris gameplay with all 7 standard pieces (I, O, T, S, Z, J, L)
- Smooth piece movement and rotation
- Line clearing with scoring system
- Level progression with increasing speed
- Ghost piece preview
- Responsive design
- Modern, beautiful UI with glassmorphism effects
- ← → Move left/right
- ↓ Soft drop
- ↑ Rotate piece
- Space Hard drop
- P Pause/Resume
- Open
index.htmlin your web browser - Use the arrow keys to move and rotate pieces
- Fill complete horizontal lines to clear them and score points
- The game speeds up as you progress through levels
- Game ends when pieces reach the top of the board
To deploy this game on GitHub Pages:
- Push this repository to GitHub
- Go to your repository settings
- Navigate to "Pages" in the left sidebar
- Select "Deploy from a branch" and choose "main"
- Your game will be available at
https://yourusername.github.io/tetris
index.html- Main HTML structurestyle.css- Game styling and responsive designscript.js- Complete game logic and mechanics
This game works in all modern browsers that support:
- HTML5 Canvas
- ES6 JavaScript features
- CSS3 transforms and gradients