The application has been deployed here.
- Install node and npm.
- Install yarn.
- Download or clone this repo to your local machine.
- Using terminal in Mac or command prompt in windows, go to the root folder of the app where the
package.json
file is located and type in the commandyarn install
ornpm install
to install all the dependencies for the app. - Type in the command
yarn start
ornpm start
in the terminal or command prompt to start the application using your local server.
- Choose the game mode you want to play as.
- Choose the Player you want to play as.
- Click start.
- Click on the boxes to display the respective pieces depending on the player and the game mode you choose.
- Undo button available to undo a particular move, in between a game untill the game is over.
- Reset button to reset the game at anytime during the play.
- Hot swapping of pieces available at any given time throughout the game, depending the game mode selection.
- An undo button that removes the last move.
- Production level code.
- Used bootstrap 4 for a Responsive Layout.
- Added bonus section for the Frontenddevlandia mode.
- Achieved hot swapping of the pieces at any given time throughout the game.
- Added a Reset button to reset the game (not mentioned in the task).
Used Jest that comes pre-configured with create-react-app for testing. Other libraries used include:
- enzyme: Made by AirBnb, specifically made to help test React components
- enzyme-adapter-react-16: Needed to have enzyme work with your version of React
- enzyme-to-json: Let's you customize how Jest serializes snapshots
- sinon: Spy functions, mocks, and stubs
The application has been successfully tested on all standard web and mobile browsers.