Speed Game. More...
Classes | |
| class | lab02.RxnGame |
| Reaction Game Class. More... | |
Functions | |
| def | lab02.gameLoop (game) |
| Run game indefinitely. More... | |
| def | lab02.main () |
| Main. More... | |
Speed Game.
This script incorperates an LED, button, and timer into a reflex game. One begun the player has a random amount of time between 2 and 3 seconds before the onboard green LED is illuminated. Once lit, the user has one second to press the blue button on the board. Their reation time is recored and reported. If they fail to press the button within the second their session expires and their stats are printed to the screen before the next session begins automatically. The game continues indefinitely unitl the user presses ^C to quit.
| def lab02.gameLoop | ( | game | ) |
Run game indefinitely.
Game continues plays until ^C pressed
| game | is a RxnGame object |
| def lab02.main | ( | ) |
Main.
Funition auto-runs after boot. Initializes game object and begins gameLoop