Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@socialgorithm/ultimate-ttt

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@socialgorithm/ultimate-ttt

Nodejs implementation of Ultimate Tic Tac Toe

  • 10.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
21
increased by75%
Maintainers
2
Weekly downloads
 
Created
Source

Ultimate Tic Tac Toe - Game Engine

Ultimate Tic Tac Toe implementation for algorithmic battles & hackathons :)

Travis npm Coverage Status npm npm

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.

Keywords

FAQs

Package last updated on 11 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc