Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anubhab-m02/2048
Built a 2048 game, cuz I was bored
https://github.com/anubhab-m02/2048
2048-game css html html-css-javascript javascript
Last synced: 6 days ago
JSON representation
Built a 2048 game, cuz I was bored
- Host: GitHub
- URL: https://github.com/anubhab-m02/2048
- Owner: anubhab-m02
- Created: 2024-12-03T06:13:10.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-12-03T07:14:18.000Z (2 months ago)
- Last Synced: 2024-12-03T08:19:36.315Z (2 months ago)
- Topics: 2048-game, css, html, html-css-javascript, javascript
- Language: JavaScript
- Homepage:
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 2048 Game
A modern implementation of the classic 2048 puzzle game built with vanilla JavaScript, HTML, and CSS. This version features smooth animations, an undo function, and the ability to continue playing after winning.
![2048 Game](Winner.png)
## Features
- đŽ Classic 2048 gameplay mechanics
- âŠī¸ Undo move functionality
- đ Continue playing after reaching 2048
- đ¯ Score tracking## How to Play
1. Use arrow keys (â â â â) to move tiles
2. When two tiles with the same number touch, they merge into one
3. Create a tile with the number 2048 to win
4. If you can't make a move, the game is over### Controls
- **Arrow Keys**: Move tiles
- **Undo Button**: Revert last move
- **Keep Going**: Continue playing after winning
- **Try Again**: Start a new game## Technical Implementation
The game is built using:
- Vanilla JavaScript for game logic
- CSS Grid for the game board
- CSS transforms for smooth animations
- Modern ES6+ features### Key Components
- `game.js`: Core game logic and state management
- `styles.css`: Game styling and animations
- `index.html`: Game structure and layout## Local Development
1. Clone the repository
2. Open `index.html` in your browser
3. No build process required - it's all vanilla JavaScript!## Contributing
Feel free to submit issues and pull requests for:
- New features
- Bug fixes
- Performance improvements
- Documentation updates