Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 575 Bytes

File metadata and controls

15 lines (11 loc) · 575 Bytes

Python Games

Programs

rock-game-foundation.py

This is a foundation game that illustrates several techniques:

  • Game flow is controlled in the main() method and this is called using the best practice using name.
  • An infinite loop in the main method that prompts to "Play Again."
  • Global scores that are referenced in the function by using the "global" keyword.
  • User input validation and looping when an invalid choice is entered. When a valid choice is entered the function (and the loop) exits with the return.

TODO

  • Add winner logic to pick_winner()