https://github.com/bt-diana/2048
2048 web-game
https://github.com/bt-diana/2048
css game html javascript mvc webpack
Last synced: 5 months ago
JSON representation
2048 web-game
- Host: GitHub
- URL: https://github.com/bt-diana/2048
- Owner: bt-diana
- License: mit
- Created: 2024-01-30T19:16:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-17T15:27:55.000Z (over 1 year ago)
- Last Synced: 2025-05-21T04:11:24.611Z (about 1 year ago)
- Topics: css, game, html, javascript, mvc, webpack
- Language: JavaScript
- Homepage: https://bt-diana.github.io/2048/
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 2048 Game
This project is an implementation of the **2048 game**, built with a focus on smooth user experience.
The primary purpose of this project was to gain hands-on experience in working with **CSS animations**.
[Demo](https://bt-diana.github.io/2048/)
## Gameplay
### Objective
Combine tiles with the same number to create higher-value tiles. There are no limits — reach as high as you can!🚀
### Rules
- **Move Tiles:** Use the arrow keys to slide all tiles in one direction: Up, Down, Left, or Right.
- **Merge Tiles:** When two tiles with the same number collide during a move, they merge into one tile with the sum of their values.
- **Score Points:** Each merge adds the value of the new tile to your score.
- **Game Over:** The game ends if there are no more valid moves (no empty spaces and no adjacent tiles with the same number).

## Getting Started
To try out the game locally:
1. Clone the repository:
```bash
git clone https://github.com/bt-diana/2048.git
```
2. Navigate to the project directory:
```bash
cd 2048
```
3. Install all dependencies:
```bash
npm install
```
4. To builds the project and start a local web server run the following commands:
```bash
npm run build
```
5. Go to the `dist` directory and open the `index.html` file in your browser.
## Technologies Used
- HTML
- CSS
- JavaScript
- Webpack
## Project Architecture
The project follows the **Model-View-Controller (MVC)** pattern.
## License
This project is licensed under the MIT License.