Skip to main content

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]

Metadata

Release files for onx 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onx 0.3.1
File Size Uploaded
onx-0.3.1.tar.gz 23.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for onx 0.3.1
File Interpreter ABI Platform
onx-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 48.4 kB

Release files / onx-0.3.1.tar.gz

Download URL onx-0.3.1.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
779e0407c4e9aa62f3d8e759245505b277a4509ce8be515e6d1af18298e3c878
BLAKE2b-256 checksum
How to use checksums
35e24faf9be6da83fa60a6f2c78e642cb8eb531ee675a32f1849411b03314d27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.15 CPython/3.10.6 Darwin/20.6.0

Release files / onx-0.3.1-py3-none-any.whl

Download URL onx-0.3.1-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e57901ba080e4856c1084405401be65acac6f97d2002619989467afa710f15d
BLAKE2b-256 checksum
How to use checksums
bb2a75f401a70f912052f34a8b8079a5e73998a509cb56f97a8c6f253fddad5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.15 CPython/3.10.6 Darwin/20.6.0

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page