Skip to main content

Command-line implementation of Zhot, an extensible Scissors-Paper-Stone game.

Project description

http://img.shields.io/:version-0.2.1-green.svg

Zhot

I had some fun teaching myself Perl with my Rock-Paper-Scissors script over at https://bitbucket.org/AmyDeeDempster/rock-paper-scissors

This is a more extensible version in Python, done in a more mathematical and object-oriented manner.

Usage

### Establishing game rules

Supply a Comma-Separated Values file as a command-line argument for this script. For example:

zhot moves/moves-5.csv

If not supplied, a default set of three-move rules will be used.

### Gameplay and user input

In the game, type the name of the move you wish to play. This can be abbreviated.

Other commands available include:

  • rules or help

  • score

  • rounds

  • diagram

  • exit or quit

You can also just hit Return to quit the game.

### Rule diagram

The diagram command generates, from the rules of the current game a vector diagram illustrating those rules.

Dependencies

### Built-in

  • csv

  • random

  • sys

  • re

  • math

### Third-party (pyPI)

  • numpy

  • svgwrite

  • scour

Interpreter

Python > 3.6

(Tested on macOS and Korora Linux installations of CPython 3.6.5 and 3.7.0b4)

Licence

Creative Commons

See text in LICENCE.html

Further information at https://creativecommons.org/licences/by-sa/3.0/au/

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

zhot-0.2.1.tar.gz (8.5 kB view details)

Uploaded Source

File details

Details for the file zhot-0.2.1.tar.gz.

File metadata

  • Download URL: zhot-0.2.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.0b4

File hashes

Hashes for zhot-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7c57b4ad64192d4ae3edb552d75783952d70017ab868ca8a10b024f01ef0af60
MD5 06c0570d31a49d4deacf0a31edd7453e
BLAKE2b-256 fdc4df4f463f2d3cbd350828b528661c1694b1d7c4d7260d3433ebec1dd0bdea

See more details on using hashes here.

Supported by

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