Skip to main content

Stone Paper Scissors - a basic program to play rock,paper,scissors with PC

Project description

Rock Paper Scissors - a basic program to play rock,paper,scissors with PC

A fun Python package to play rock paper scissors with PC

This is just a basic stress-buster game module to play with your PC Created by Aswin Venkat aswinvenk8@gmail.com

Installation

Run the following to install:

pip install spsgamepkg

Methods

  1. game.rules() Will display the rules of the game

  2. game.Game('name').game(count:int) Count -> The number of times you want to play the game with PC

  3. game.Game('name').clear_score() Will clear the score (initialise the score back to 0)

  4. game.Game('name').display_result() Will display the result of the game.

  5. game.Game('name').condition(pc='', player='') entering ['stone' or 'paper' or 'scissors'] in pc='{}' and player='{}' will directly give you the result

EXAMPLE CODE

from spsgamepkg import game

# Display rules
>> game.rules()

# initialize player
aswin_game=game.Game('Aswin')

# Play a game
>> aswin_game.game(5)

# Display Result
>> aswin_game.display_result()

# Reset the scores
>> aswin_game.clear_score()

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

spsgamepkg-0.0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spsgamepkg-0.0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file spsgamepkg-0.0.2.tar.gz.

File metadata

  • Download URL: spsgamepkg-0.0.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for spsgamepkg-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d29efdff5092a606b65e9e428078b926643562678fce5404311535eea6cb8a5f
MD5 503359a0c7e7a7374b1d665c3ba0c2a3
BLAKE2b-256 4d4dab96453ceba881e42da1ad250d8f38be0b532f0b5a40e4d52b0bfbe11597

See more details on using hashes here.

File details

Details for the file spsgamepkg-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: spsgamepkg-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.5

File hashes

Hashes for spsgamepkg-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 45e305471016cfaf3098b9100e653f344a1216fad336149927e60e8f3791ca04
MD5 d4eb595bd00e6b6d84b667be553694e6
BLAKE2b-256 e0f7641e28dd6cdafeacfeb8309af69a8ee37c57d6553617c21e54fcb71d2fc6

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