uttt

Ultimate Tic Tac Toe Algorithm - Game Server Edit

uttt has been deprecated in favor of @socialgorithm/uttt, please install with /usr/local/bin/uttt -> /usr/local/lib/node_modules/@socialgorithm/uttt/bin/index.js > uws@0.14.5 install /usr/local/lib/node_modules/@socialgorithm/uttt/node_modules/uws > node-gyp rebuild > build_log.txt 2>&1 || exit 0 /usr/local/lib └─┬ @socialgorithm/uttt@5.2.0 ├── @socialgorithm/ultimate-ttt@4.18.0 ├── @types/ip@0.0.29 ├── @types/node@7.0.22 ├─┬ @types/socket.io@1.4.29 │ └── @types/node@7.0.22 deduped ├── blessed@0.1.81 ├─┬ command-line-args@4.0.5 │ ├─┬ array-back@1.0.4 │ │ └── typical@2.6.1 deduped │ ├─┬ find-replace@1.0.3 │ │ ├── array-back@1.0.4 deduped │ │ └─┬ test-value@2.1.0 │ │ ├── array-back@1.0.4 deduped │ │ └── typical@2.6.1 deduped │ └── typical@2.6.1 ├─┬ command-line-usage@4.0.0 │ ├─┬ ansi-escape-sequences@3.0.0 │ │ └── array-back@1.0.4 deduped │ ├── array-back@1.0.4 deduped │ ├─┬ table-layout@0.4.0 │ │ ├── array-back@1.0.4 deduped │ │ ├── deep-extend@0.4.2 │ │ ├── lodash.padend@4.6.1 │ │ ├── typical@2.6.1 deduped │ │ └─┬ wordwrapjs@2.0.0 │ │ ├── array-back@1.0.4 deduped │ │ ├─┬ feature-detect-es6@1.3.1 │ │ │ └── array-back@1.0.4 deduped │ │ ├── reduce-flatten@1.0.1 │ │ └── typical@2.6.1 deduped │ └── typical@2.6.1 deduped ├── ip@1.1.5 └─┬ socket.io@2.0.1 ├─┬ debug@2.6.8 │ └── ms@2.0.0 ├─┬ engine.io@3.1.0 │ ├─┬ accepts@1.3.3 │ │ ├─┬ mime-types@2.1.15 │ │ │ └── mime-db@1.27.0 │ │ └── negotiator@0.6.1 │ ├── base64id@1.0.0 │ ├── cookie@0.3.1 │ ├── debug@2.6.8 deduped │ ├─┬ engine.io-parser@2.1.1 │ │ ├── after@0.8.2 │ │ ├── arraybuffer.slice@0.0.6 │ │ ├── base64-arraybuffer@0.1.5 deduped │ │ ├── blob@0.0.4 │ │ └── has-binary2@1.0.2 deduped │ ├── uws@0.14.5 │ └─┬ ws@2.3.1 │ ├── safe-buffer@5.0.1 │ └── ultron@1.1.0 ├── object-assign@4.1.1 ├─┬ socket.io-adapter@1.1.0 │ └─┬ debug@2.3.3 │ └── ms@0.7.2 ├─┬ socket.io-client@2.0.1 │ ├── backo2@1.0.2 │ ├── base64-arraybuffer@0.1.5 │ ├── component-bind@1.0.0 │ ├── component-emitter@1.2.1 │ ├─┬ debug@2.6.4 │ │ └── ms@0.7.3 │ ├─┬ engine.io-client@3.1.1 │ │ ├── component-emitter@1.2.1 deduped │ │ ├── component-inherit@0.0.3 │ │ ├── debug@2.6.8 deduped │ │ ├── engine.io-parser@2.1.1 deduped │ │ ├── has-cors@1.1.0 deduped │ │ ├── indexof@0.0.1 deduped │ │ ├─┬ parsejson@0.0.3 │ │ │ └── better-assert@1.0.2 deduped │ │ ├─┬ parseqs@0.0.5 │ │ │ └── better-assert@1.0.2 deduped │ │ ├── parseuri@0.0.5 deduped │ │ ├── ws@2.3.1 deduped │ │ ├── xmlhttprequest-ssl@1.5.3 │ │ └── yeast@0.1.2 │ ├── has-cors@1.1.0 │ ├── indexof@0.0.1 │ ├── object-component@0.0.3 │ ├─┬ parseuri@0.0.5 │ │ └─┬ better-assert@1.0.2 │ │ └── callsite@1.0.0 │ ├── socket.io-parser@3.1.2 deduped │ └── to-array@0.1.4 └─┬ socket.io-parser@3.1.2 ├── component-emitter@1.2.1 deduped ├── debug@2.6.8 deduped ├─┬ has-binary2@1.0.2 │ └── isarray@2.0.1 deduped └── isarray@2.0.1
Last updated 3 years ago by aurbano .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install uttt 
SYNC missed versions from official npm registry.

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 uttt

Alternatively, clone this repository, cd into it, and run npm link to make the executable available:

$ git clone git@github.com:aurbano/ultimate-ttt-server.git
$ cd ultimate-ttt-server
$ npm link

Run in online mode

By default, the server will start in online mode and listen for players on port 3141. The server starts up a terminal GUI displaying the current online players and game stats. Players are paired automatically as soon as there are two available players.

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

You can launch the server using:

$ uttt --gui

Online demo

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)
  -u, --gui           Display a fancy GUI in the terminal (only available in online mode)
  -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 --gui
  $ 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.

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.

Current Tags

  • 4.1.0                                ...           latest (3 years ago)

11 Versions

  • 4.1.0 [deprecated]           ...           3 years ago
  • 3.0.1 [deprecated]           ...           3 years ago
  • 3.0.0 [deprecated]           ...           3 years ago
  • 2.7.0 [deprecated]           ...           3 years ago
  • 2.6.0 [deprecated]           ...           3 years ago
  • 2.5.1 [deprecated]           ...           3 years ago
  • 2.5.0 [deprecated]           ...           3 years ago
  • 2.4.0 [deprecated]           ...           3 years ago
  • 2.3.0 [deprecated]           ...           3 years ago
  • 2.2.1 [deprecated]           ...           3 years ago
  • 2.2.0 [deprecated]           ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (9)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |