Skip to content

caspian311/python-rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Python: Rock, Paper, Scissors#

Just to keep my Python skills up. A rock, paper, scissors console game.

###Dependencies:###

pip install -U pytest mock pytest-mock

###Run tests:###

py.test

###Run game:###

./bin/play.sh

Tring to avoid embedded if/else blocks like this:

if self is rock:
   if other is paper:
      lose
   if other is scissors:
	  win
   if other is rock:
      tie
if self is scissors:
   if other is paper:
	 lose
   if other is rock
      win
   if other is scissors:
      tie
if self is paper:
   if other is scissors:
      lose
   if other is rock:
      win
   if other is paper:
      tie

About

Just to keep my Python skills up. A rock, paper, scissors console game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published