Tetris
Introduction
Tetris is the world-famous puzzle game that has captivated players since 1984. This JavaScript implementation brings the classic falling block experience to your browser. The game features the iconic seven tetromino shapes - I, O, T, S, Z, J, and L - each made of four squares. The objective is simple yet endlessly engaging: arrange the falling pieces to create complete horizontal lines, which then disappear, earning you points and keeping the game going.
Gameplay
The core gameplay revolves around manipulating falling tetrominoes as they descend from the top of the playing field. You can move each piece left or right, rotate it, or accelerate its descent. When a horizontal line is completely filled with blocks, it clears and all blocks above fall down. The game progressively increases in speed, challenging your reflexes and spatial reasoning. Strategic planning is essential - you must think ahead about where each piece will fit best, and consider setting up combos by clearing multiple lines at once. A 'Tetris' occurs when you clear four lines simultaneously with a single I-piece, earning maximum points.
Controls
Use the Left Arrow and Right Arrow keys to move the falling piece horizontally. Press the Up Arrow key to rotate the piece clockwise. Use the Down Arrow key to accelerate the piece's descent (soft drop). Press the Spacebar for an instant hard drop, placing the piece immediately at the bottom. The P key pauses and resumes the game. On mobile devices, touch controls appear on screen for left, right, rotate, and drop actions.