msalman81 / 2048

One of everyone's favorite classics! A practice for me to work with Javascript DOM and Bootstrap and relate to UI/UX elements!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2048

The game is extremely simplistic, you just press the WASD keys to move the tiles around, In a single move all the tiles move in that specific direction. If the tiles have similar values and are moved in the same direction then they combine and form a number that is twice the numbers merging. If you run out of moves then gameOver else if you make the number 2048 then that is the winning point of the game.

A key thing for me in this game was the javascript DOM manipulation and I used a similar approach of making those tiles as array elements and accessed them accordingly with the javascript DOM. The colors change and get more intense as the number merged grow larger and there are score and highscore elements present in the game. The files have proper commenting if some help is needed to understand the code.

Run Instructions: You can either download the files and open index.html with a browser, or you can access this link to play the game online: https://msalman81.github.io/2048/

Here is a sneakpeak from the game! Capture

About

One of everyone's favorite classics! A practice for me to work with Javascript DOM and Bootstrap and relate to UI/UX elements!


Languages

Language:JavaScript 76.9%Language:CSS 12.6%Language:HTML 10.5%