Skip to content

kianbusby/tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tetris Game

A simple, modern Tetris game built with HTML5 Canvas, CSS3, and vanilla JavaScript.

Features

  • 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

Controls

  • ← → Move left/right
  • Soft drop
  • Rotate piece
  • Space Hard drop
  • P Pause/Resume

How to Play

  1. Open index.html in your web browser
  2. Use the arrow keys to move and rotate pieces
  3. Fill complete horizontal lines to clear them and score points
  4. The game speeds up as you progress through levels
  5. Game ends when pieces reach the top of the board

GitHub Pages Deployment

To deploy this game on GitHub Pages:

  1. Push this repository to GitHub
  2. Go to your repository settings
  3. Navigate to "Pages" in the left sidebar
  4. Select "Deploy from a branch" and choose "main"
  5. Your game will be available at https://yourusername.github.io/tetris

Files

  • index.html - Main HTML structure
  • style.css - Game styling and responsive design
  • script.js - Complete game logic and mechanics

Browser Compatibility

This game works in all modern browsers that support:

  • HTML5 Canvas
  • ES6 JavaScript features
  • CSS3 transforms and gradients

About

blocks do blocky things

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published