https://youthful-fermat-1d00cf.netlify.app/
you can change variable WIN_SCORE
in src/const.js
to change the target number for win
-
Clone this repository
git clone https://github.com/piya03/react-2048-game.git
-
Run
yarn install
-
Run
yarn start
- Reactjs (hooks)
- undo, redo and replay
- Playable using the arrow keys of the keyboard.
- The basic rules & conventions of the 2048 game should be followed.
- The best score and current score get tracked.
- Persist the state of app on reload
- An UNDO button, that undoes the last move. If there are no last moves it will be disabled.
- A REDO button that redoes the movie. If there are no moves to redo, it will be disabled.
- A REPLAY button that basically auto plays the game from the first move to the most recent move. When starting the game, the Replay button will be disabled.
- The Replay will have a timeout of 2 seconds between each move, which will be configurable.
- When Replay is in progress, no new moves are allowed.
- Added a reset button to the UI, which will essentially restart the game from scratch.
- When the game is won , a modal will be shown showing success message.
- Keep a track of moves also