New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@socialgorithm/uttt

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@socialgorithm/uttt

Ultimate Tic Tac Toe Algorithm - Game Server Edit

  • 6.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Ultimate TTT - Server

Ultimate Tic Tac Toe Algorithm - Game Server

Travis npm Coverage Status npm

This is a system intended for games & hackathons mainly, for teams to write their own bot and compete against other bots.

They will be playing games of "Ultimate Tic Tac Toe", which provides a great opportunity for learning, predicting moves...

Getting started

Deploy online

You can directly deploy the server to Heroku for a quick start:

Deploy to Heroku

When deploying, choose any available App Name (or let Heroku decide for you), and click on Deploy. Once it's finished browse to https://{app-name}.herokuapp.com and you should see the server welcome message.

If you open our web client, you can then connect it to the server by clicking on "Connect" and entering https://{app-name}.herokuapp.com as the server host.

Install locally

 $ npm install -g @socialgorithm/uttt

Run in online mode

By default, the server will start in online mode and listen for players on port 3141.

By default the server will have players play 1000 games per session.

You can launch the server using:

$ uttt

Options:

uttt

  Ultimate Tic Tac Toe - Game Server

Options

  --verbose           The input to process.
  -v, --version       Display the server version
  -p, --port 3141     Port on which the server should be started (defaults to 3141)
  -g, --games 1000    Number of games to play, defaults to 1000
  -t, --timeout 100   Milliseconds after which a player loses (defaults to 100)
  -h, --help          Print this guide

Synopsis

  $ uttt --games 100
  $ uttt --port 5000
  $ uttt --help

When running in online mode you can also use env variables to override the settings (which is very useful when deploying to a server for example)

  • PORT overrides the port
  • TTT_TIMEOUT overrides the timeout
  • TTT_GAMES overrides the number of games that are played per round

The server uses the ultimate-ttt Nodejs implementation of the game to validate and verify game states.

If you're developing a client in JavaScript you can also use that package to maintain your local state easily.

Developer Docs

Roadmap

  • Execute X number of games and display stats
  • Setup a server so clients can play over a socket
  • Setup a DB so players can use a token to identify
  • Create a web frontend to see stats and manage the competition (ultimate-ttt-web)

Testing a client

This repository includes a test file that can be run against a custom client to verify that it does the basics right. Simply copy tests/client.test.js and point it to your implementation. The tests can be run by installing ava and then adding it as the test runner in your package.json file.

Keywords

FAQs

Package last updated on 03 Aug 2018

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