Ultimate Tick Tack Toe implementation for algorithmic battles & hackathons :)
This is a JavaScript implementation of the Ultimate Tic Tac Toe game.
What this package provides is a class that holds all game state and performs all required logic, exposing a simple API.
Example state at a given point:
import UTTT from '@socialgorithm/ultimate-ttt';
const game = new UTTT();
// ... perform some moves ...
console.log(game.prettyPrint());
/*
Outputs the following:
1 - - | - - - | - - -
0 - - | - - - | - - -
1 - - | 1 - - | - - -
------+-------+-------
1 - - | - - - | - - -
- - - | - - - | - - -
- - - | - - - | - - -
------+-------+-------
- 1 - | - - - | - - -
- - - | - - - | - - -
- - - | - - - | - - -
------+-------+-------
*/
Install from npm:
$ npm install --save @socialgorithm/ultimate-ttt
Import and use:
import UTTT from '@socialgorithm/ultimate-ttt';
const game = new UTTT();
Generated using TypeDoc