Skip to content

mmatthews06/react-tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Tic-Tac-Toe

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.

Special Notes

  • 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.

Installation

This set of steps currently only starts up the dev server, but it should suffice as a demo.

  1. Make sure you have Node.js and NPM installed
  2. Clone this repository.
git clone https://github.com/mmatthews06/react-tic-tac-toe.git
  1. Install Node modules:
npm install
  1. Run the API server:
npm run start:api
  1. Run the front-end:
npm start
  1. If a browser does not open up immediately, navigate to http://localhost:3000 in a browser.

Tests

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.

About

A React, and Node.js Tic Tac Toe game

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published