This package has been deprecated

Author message:

ultimate-ttt has been deprecated in favor of @socialgorithm/ultimate-ttt, please install with /usr/local/lib └── @socialgorithm/ultimate-ttt@4.18.0

ultimate-ttt
TypeScript icon, indicating that this package has built-in type declarations

4.5.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i ultimate-ttt

Weekly Downloads

0

Version

4.5.0

License

MIT

Last publish

Collaborators

  • aurbano