4.5.0 • Published 8 years ago

ultimate-ttt v4.5.0

Weekly downloads
8
License
MIT
Repository
github
Last release
8 years ago

Ultimate Tic Tac Toe

Ultimate Tick Tack Toe implementation for algorithmic battles & hackathons :)

Travis npm Coverage Status npm npm Codacy grade

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 '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 ultimate-ttt

Import and use:

import UTTT from 'ultimate-ttt';
const game = new UTTT();

API Documentation

Projects using this

  • uttt-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 agains each other.
4.5.0

8 years ago

4.4.1

8 years ago

4.4.0

8 years ago

4.3.0

8 years ago

4.2.0

8 years ago

4.1.3

8 years ago

4.1.2

8 years ago

4.1.1

8 years ago

4.1.0

8 years ago

4.0.0

8 years ago

3.1.0

8 years ago

3.0.0

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago