Skip to content

๐ŸŽฎ Classic Tetris game built with pure HTML5, CSS3, and JavaScript. ๐Ÿ“š Educational project demonstrating MVC architecture, Canvas API, and modern ES6+ features. ๐Ÿšซ๐Ÿ“ฆ No external dependencies

License

Notifications You must be signed in to change notification settings

codeWithMarina/javascript-tetris

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Tetris Game - Pure JavaScript Implementation

A complete implementation of the classic Tetris game built with vanilla HTML5, CSS3, and JavaScript. No external libraries or frameworks required. This project demonstrates game development fundamentals, object-oriented programming, and modern JavaScript concepts.

Live Demo

๐ŸŽฎ Play Tetris Online

Features

  • Pure vanilla JavaScript implementation
  • Classic Tetris gameplay mechanics
  • Responsive controls
  • Score tracking system
  • Pause/Resume functionality
  • No dependencies or build process required

How to Play

Play Online

Visit the live demo link above to play directly in your browser.

Play Locally

  1. Clone the repository:

    git clone https://github.com/hoffhannisyan/javascript-tetris.git
    cd javascript-tetris
  2. Open index.html in your web browser

No installation or build process required!

Game Controls

Key Action
Enter Start game / Restart after game over
Space Pause / Resume game
Arrow Left (โ†) Move tetromino left
Arrow Right (โ†’) Move tetromino right
Arrow Up (โ†‘) Rotate tetromino clockwise
Arrow Down (โ†“) Soft drop (faster descent)

Technology Stack

  • HTML5 Canvas
  • CSS3
  • Vanilla JavaScript (ES6+)

Learning Objectives

This project demonstrates:

  • Game loop implementation
  • Collision detection
  • Object-oriented programming in JavaScript
  • DOM manipulation
  • Event handling
  • Canvas API usage

Browser Compatibility

Works on all modern browsers that support HTML5 Canvas:

  • Chrome
  • Firefox
  • Safari
  • Edge

About

๐ŸŽฎ Classic Tetris game built with pure HTML5, CSS3, and JavaScript. ๐Ÿ“š Educational project demonstrating MVC architecture, Canvas API, and modern ES6+ features. ๐Ÿšซ๐Ÿ“ฆ No external dependencies

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.0%
  • HTML 29.6%
  • CSS 2.4%