This is the board game, Checkers aka English draughts, built in React.
There are many variants on this game.
The rules found here are used to build this version of the game:
https://en.wikipedia.org/wiki/English_draughts/
This project is split into three main components, listed here from top to bottom:
- Board
- Tile
- Piece
The game state and logic is handled by a custom react hook, useBoard.
This hook returns the state and a function to handle the movement of checker pieces.
The drag and drop user interface is implement with react-dnd:
https://github.com/react-dnd/react-dnd
Currently, there is a rudimentary computer opponent that will make a random move on their turn.
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.