2048 is game where you combine numbered tiles to get higher number tiles.
- Combine blocks using the 4 direction arrows on your keyboard (up, right, down, left).
- Adjacent blocks with the same number get added up while moving
- On every move a new block with either the number 2 or 4 is added
- If the blocks are all filled and there are no adjacent blocks that can be combined, the game will be lost.
- Objective is to get a block with the number 2048
.
├── assets/
│ └── ...Application assets and sounds
├── readme-assets/
│ └── ...Github assets
└── src/
├── components/
│ ├── board/
│ │ ├── ...Board initializer
│ │ └── ...Exposed functions to allow movement
│ ├── controls/
│ │ └── ...Event listeners for directions
│ └── ...Other parts of application, emphasis on parts
└── tools/
└── ...Side functionality tooling such as type checkers
This is a 2048 game I made using html-css for design and javascript for interactivity.
I wrote all the app logic in app.js because I didn't think it would take alot :D but if I were to add the new features or make another game, I'll make much more extensive use of modules.
I'm hoping to keep improving this project and add some features I personally thought of.
The features to be implemented are below:
- History of moves
- Replay functionality
- Undo functionality
- History of top scores on local storage or as a cookie
- Special blocks and etc...