This is a demo project, where a user can play Tic-Tac-Toe with a very clever Node.js server.
This project uses React 16.x, Node.js 8.x (LTS), and Bablyon.js 3.2.0 at present. There are plans to add more front-end renderers besides SVG (e.g., the Bablyon board is in progress), and one or two more back-end players that are more AI-like, and probabilistic in their moves.
- This project is about a lot of things, but, right now, the Tic-Tac-Toe algorithm isn't one of them. I have plans for basically every piece of this. All in due time.
- Next steps include finishing the Babylon.js 3D board, moving the little bit of state to a Redux store, UI updates (and likely an Ant Design front-end, since I prefer it to Material UI), a reinforcement learning-trained Tic-Tac-Toe playing agent, and more.
This set of steps currently only starts up the dev server, but it should suffice as a demo.
- Make sure you have Node.js and NPM installed
- Clone this repository.
git clone https://github.com/mmatthews06/react-tic-tac-toe.git
- Install Node modules:
npm install
- Run the API server:
npm run start:api
- Run the front-end:
npm start
- If a browser does not open up immediately, navigate to http://localhost:3000 in a browser.
To run the tests in watch mode:
npm test
To see a coverage report:
npm test:coverage
NOTE: If you get an odd filesystem-related error running these tests, you may need to install watchman
on your machine. E.g., brew install watchman
This project was bootstrapped with Create React App.