10.2.1 • Published 3 years ago
@socialgorithm/ultimate-ttt v10.2.1
Ultimate Tic Tac Toe - Game Engine
Ultimate Tic Tac 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 - | - - - | - - -
- - - | - - - | - - -
- - - | - - - | - - -
------+-------+-------
*/
Getting started
Install from npm:
$ npm install --save @socialgorithm/ultimate-ttt
Import and use:
import UTTT from '@socialgorithm/ultimate-ttt';
const game = new UTTT();
API Documentation
Projects using this
- ultimate-ttt-player-js UTTT Algorithm that plays at random, provided as a base for your own algorithms!
- ultimate-ttt/server: Game server that uses this package as a game engine to pitch two playing algorithms against each other.
10.2.1
3 years ago
10.0.3-alpha.0
3 years ago
10.0.0
3 years ago
10.0.1
3 years ago
10.0.2
3 years ago
10.0.1-alpha.0
3 years ago
9.0.2-alpha.0
3 years ago
9.0.0
4 years ago
4.19.0
7 years ago
4.18.0
7 years ago
4.17.0
7 years ago
4.16.0
7 years ago
4.15.2
7 years ago
4.15.1
7 years ago
4.15.0
7 years ago
4.14.0
7 years ago
4.13.0
7 years ago
4.12.0
7 years ago
4.11.1
7 years ago
4.11.0
7 years ago
4.10.0
7 years ago
4.9.0
7 years ago
4.8.0
7 years ago
4.7.4
7 years ago
4.7.3
7 years ago
4.7.2
7 years ago
4.7.1
7 years ago
4.7.0
7 years ago
4.6.4
7 years ago
4.6.3
7 years ago
4.6.2
7 years ago
4.6.1
7 years ago
4.6.0
7 years ago
4.5.2
7 years ago
4.5.1
7 years ago
4.5.0
7 years ago