Jaffa's Rock, Paper, Scissors...Click!

by Jaffa

30 May 2017

Here’s my version of Rock, Paper, Scissors:

There is a lot of code in this that could probably be condensed. I wasn’t exactly sure how to migrate turtles that I created in helper.py into main.py. I think that I needed to set those turtles as global, but I decided that it wasn’t that important. Also, I wanted the player to choose their instrument simply by clicking, but it kept on reverting to Paper.

It took me a long time to figure out that I needed to define player_score and comp_score outside of all the while loops so that the score wouldn’t reset to 0 before every new game. For the future, I’d like to work on the clicking thing, figure out how to limit the games played to 3 (I could probably use a for loop), and make it spiffier. Enjoy!

Jaffa is a rising second-year MSIS student. She has lived in 6 different states. Find Jaffa on Twitter, Github, and on the web.