https://github.com/ducin/noughts-and-crosses
simple socket game, travis-integrated
https://github.com/ducin/noughts-and-crosses
Last synced: about 1 year ago
JSON representation
simple socket game, travis-integrated
- Host: GitHub
- URL: https://github.com/ducin/noughts-and-crosses
- Owner: ducin
- Created: 2013-06-06T07:59:48.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2015-06-07T14:43:11.000Z (about 11 years ago)
- Last Synced: 2025-06-04T21:45:11.942Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 192 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
noughts-and-crosses
===================
Simple socket/console game implementation.
.. image:: https://travis-ci.org/ducin/noughts-and-crosses.png?branch=master
:target: https://travis-ci.org/ducin/noughts-and-crosses
.. image:: https://badge.fury.io/py/nac.svg
:target: http://badge.fury.io/py/nac
dependencies & installation
---------------------------
Works under python version: 2.6, 2.7. No additional dependencies. Install package with pip:
::
$ pip install nac
overview
--------
This repository holds a python package implementing a simple socket game,
`Noughts and Crosses`_.
.. _Noughts and Crosses: http://en.wikipedia.org/wiki/Tic-tac-toe
First you shall run the server, and then the client:
::
$ ./nac/server.py
$ ./nac/client.py
You will see the game board represented by few console lines:
::
(0)|(1)|(2)
---+---+---
(3)|(4)|(5)
---+---+---
(6)|(7)|(8)
Enter the position you want to put your mark:
Your move: 0
::
X |(1)|(2)
---+---+---
(3)|(4)|(5)
---+---+---
(6)|(7)|(8)
The server is 'X' and the client is 'O'.