To play this reaction game that is similar to Whack-A-Mole, first open a Terminal and download the files with the following command
git clone https://github.com/thomasmacpherson/pifaceReactionGame.git
Once the files have finished downloading, play the game by entering the command
When the game starts an LED will light up on the PiFace Digital board and you have to hit the corresponding button as quickly as possible. Hit the wrong one and you will lose points. The game will end after you have missed a lot of the hits.
If you have buttons connected to your PiFace Digital you can play this game with all eight LEDs. To do this, first copy the reaction game to your home directory
cp pifaceReactionGame/reactionGame.py ~
Now open the game in your favourite text editor
Navigate down to this line
return random.randint(0,3) and change the number 3 to one less than the number of buttons you have connected (e.g. if you have 8 buttons, this number would be 7).
Save your changes then play this extended version with the command