Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

2048 Game

The classic 4x4 sliding puzzle, implemented in plain HTML, CSS and JS.

Features

  • Arrow keys on desktop, swipe gestures on touch devices.
  • Score and best-score (persisted in localStorage).
  • Smooth CSS transitions on every move.
  • New game button, win / lose states.

Run it

Open index.html in any modern browser.

What it shows

  • Grid-based game state in a plain JavaScript array.
  • Pure-function move logic that's easy to test.
  • Touch event handling with a small swipe-direction helper.