Implementation of the famous 2048 game in Next.js. You can play it here.
Clone the repository. Make sure to have pnpm installed. If you don't have it, run the following command:
npm install -g pnpm
Then, install the dependencies and run the development server:
pnpm install
pnpm dev
Finally, open your browser and go to http://localhost:3000 to play the game.
- The game is played with the arrow keys ( ← ↑ ↓ → ) .
- If you want to play on your phone, you can use the swipe gestures.
This is a progressive web app, so you can download it to your phone or computer on any device.
-
- Open your preferred web browser (Google Chrome, Firefox, Safari, or Microsoft Edge).
- Go to the app.
- On the top right corner of your browser, click the three-dot icon (Chrome, Microsoft Edge) or the hamburger icon (Firefox, Safari).
- From the dropdown menu, click "Install 2048" or "Add to Home Screen."
- Follow the prompts to install the PWA.
-
- Open your preferred mobile browser (Google Chrome, Safari, Firefox, or Microsoft Edge).
- Go to the app.
- Click the "Add to Home Screen" button on the browser's menu.
- Rename the app if you wish, and then click "Add."
- The PWA will now be installed on your device.
- The language used is TypeScript.
- The game is implemented in Next.js.
- It was styled with Tailwind CSS.
- The game's state is managed with Redux Toolkit.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.