To play this memory game, that is similar to Simon, first open a Terminal and download the files with the following command
git clone https://github.com/thomasmacpherson/pifaceMemoryGame.git
Once the files have downloaded, run the game by entering the command
To play the game, watch which LED lights up and press the corresponding button. The sequence will increase by one each time making the game harder as it goes on.
The lights will turn on and off more quickly as the game progresses. When you get the sequence wrong, the game will end and print your score in the Terminal you ran the game from.
If you have buttons connected to your PiFace Digital you can play this game with all eight LEDs. To do this, first copy the memory game to your home directory
cp pifaceMemoryGame/memoryGame.py ~
Now open the game in your favourite text editor
Navigate down to this line
return 1<< 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