This project was bootstrapped with Create React App.

I wanted to re-create a simple game that I play with my family, and decided on Backgammon.

Features of the game:

  • Can see who's turn it is by which colour counter is displayed on the right hand side.
  • Can click on the die to roll, and it will indicate if each number has been used yet or not.
  • When you click on a counter after rolling the die, it will indicate with a red rectangle where that counter can be moved.
  • You can select a different counter after selecting the first one if you change your mind about which one to move, and it will show you where that second counter can be moved to.
  • You cannot move a counter onto a space that is occupied by more than one counter of the opposite colour.
  • You can move your counter onto a space with one counter of the opposite colour, and this will move that counter onto the center bar.
  • If you have a counter on the center bar, after you roll the die, if your counter can be moved back into the game, that space will be hilighted.
  • If you cannot move your counter back into the game, no other moves will be possible.

Play the game:

To run the game, clone this repo, run npm i and then npm start. Go to http://localhost:3000 in your browser to view the app.