An enhanced version of the classic 2048 game, featuring an undo mechanic and a fast mode!
- Made a wrong move? No worries!
- Just hit the "Undo" button to go back one step.
- You can undo as many times as you like, all the way back to the start.
- Never let a slip of the finger ruin your game again!
- Enter the magic sequence: ⬅️⬅️ ➡️➡️ ➡️➡️ ⬅️⬅️ (left, left, right, right; right, right, left, left).
- All tiles will magically turn into 128!
- An Easter egg to skip the early grind — just for fun.
Method 1: Clone from GitHub
git clone https://github.com/sz30/2048--.git
cd 2048--
pip install flask
python 2048--.pyOpen your browser and go to: http://localhost:3000
Method 2: Docker
(For specific containerization DEPLOYMENT strategies, please refer to the built-in 'Deployment.md' guide for the full text.)
Method 3: Download Release
- Download the latest release.
- Make sure you have Python 3.x installed.
- Install dependencies:
pip install flask - Run:
python 2048--.py - Open your browser and go to: http://localhost:3000
2048--/
├── assets/ # Project media and screenshots
├── static/
│ ├── css/
│ │ └── styles.css # Game styles
│ └── js/
│ └── script.js # Frontend game logic
├── index.html # Main game page
├── 2048--.py # Backend server
├── requirements.txt # Python dependencies
├── Dockerfile # Docker image configuration
├── docker-compose.yml # Docker compose configuration
└── DEPLOYMENT.md # Deployment guide
File Descriptions:
assets/: Stores project images such as demonstration screenshots (demo_v1.png,demo_v2.png, etc.).2048--.py: Backend server written with Flask, handles game logic and API requests.script.js: Frontend game logic, including moves, animations, and special features.styles.css: Game styles, making sure everything looks nice and responsive.index.html: The main page that brings everything together.requirements.txt: Lists the Python dependencies needed to run the backend.Dockerfile: Defines the environment to run the app using Docker.docker-compose.yml: Simplifies Docker deployment by managing services.DEPLOYMENT.md: Step-by-step guide for deploying the application.
Want to make it your own? Tweak styles.css for a new look, or dive into script.js to change up the gameplay. All code is well-commented for easy hacking!
- license: GPL-2.0
- Still updating! Issues and PRs are super welcome—let’s make this game even more awesome together!
Thanks to the following sponsors for supporting this project:
- / providing the server
Last updated: Mar. 2026
