jahnvisethjs / 2048-game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2048-game

Game is built using: HTML, CSS, JAVASCRIPT

How it works:

  1. We start randomly with 2 tiles having the number 2.
  2. We use arrow keys to navigate and merge numbers.
  3. Goal is to merge numbers and get 2048 on the tile.

Rules: 2048 is played on a 4×4 grid, with numbered tiles that slide smoothly when a player moves them using the four arrow keys. Each time you slide, a new tile will randomly appear in an empty spot on the board. Tiles slide as far as possible in the chosen direction until they are stopped by either another tile or the edge of the grid. If two tiles of the same number collide while moving, they will merge into a tile with the total value of the two tiles that collided. The resulting tile cannot merge with another tile again in the same move.

Tools I used: VSCode- Editor

About


Languages

Language:JavaScript 82.7%Language:CSS 10.7%Language:HTML 6.6%