MI
MicheleYin/2048
Re-implementation of the 2048 game using Next.js with Typescript.
๐น๏ธ 2048
Implementation of the famous 2048 game in Next.js. You can play it
here.
Pre-requisites
Installation
Clone the repository. Make sure to have pnpm installed. If you don't have it,
run the following command:
npm install -g pnpmThen, install the dependencies and run the development server:
pnpm install
pnpm devFinally, open your browser and go to http://localhost:3000 to play the game.
Controls
- The game is played with the arrow keys ( โ โ โ โ ) .
- If you want to play on your phone, you can use the swipe gestures.
Download
This is a progressive web app, so you can download it to your phone or computer
on any device.
-
For Desktop Users ๐ป:
- 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 web browser (Google Chrome, Firefox, Safari, or
-
For Mobile Users ๐ฑ:
- 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.
- Open your preferred mobile browser (Google Chrome, Safari, Firefox, or
Implementation
- 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.
Contributing
Pull requests are welcome. For major changes, please open an issue first to
discuss what you would like to change.