Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
zhot-0.2.1.tar.gz (8.5 kB) Copy SHA256 hash SHA256 Source None Aug 21, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page