Skip to main content

Noughts & Crosses (Tic Tac Toe) terminal based, client-server online game with your partner through websockets.

Project description

Noughts & Crosses (Tic Tac Toe)

RunTests

Noughts & Crosses (Tic Tac Toe) terminal based, client-server online game with your partner through websockets.

Requires

Python 3.10

Install

$ pip install onx

or

$ poetry shell
$ poetry add onx

Play Game

For running your game board just type in a terminal:

$ onx

You will see a game board in a waiting for your partner state.

Then ask your partner to run the same cli command with exactly the same cli options. You will be matched to your partner by cli options (size and winning sequence length) on a server side.

If you are running a game with a public server than I'll suggest you to make a shorter delay between running your game board and your partners board. Just for reducing the probability to be matched with somebody else.

TUI screenshot 1

There are command line options for changing game board settings. -g or --grid-size changes grid size. -w or --wining-length changes winning sequence length. -h or --help prints help.

$ onx -g14 -w3

TUI screenshot 1

Run Server and Client Locally

Set up env variables.

$ export LOCALHOST="0.0.0.0"
$ export PORT=8888

Run server.

$ onx -d

Run client.

$ onx

Run Tests

$ git clone git@github.com:vyalow/onx.git
$ cd onx
$ poetry shell
$ poetry install --no-root
$ pytest --cov

Known Limitations

  • onx is currently based on textual TUI framework which is awesome but is at an extremely early development stage. As a result you may be faced with some rendering problem like 711, 710. I'll suggest you to run a game board in a fullscreen mode for now.
  • Public server is currently running on a free Heroku app. It means that a good enough SLA is not expected.

Release

make release version=[patch | minor | major]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onx-0.3.1.tar.gz (23.1 kB view hashes)

Uploaded Source

Built Distribution

onx-0.3.1-py3-none-any.whl (25.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page