This guide will show you how to play the matching cards game form the video above, using PiFace CAD.
git clone https://github.com/thomasmacpherson/CADCards.git
Move into the newly created folder
Run CADCards with the command below. The number at the end of the command (in this example 6) sets how many pairs will appear, from a minimum of 2 to a current maximum of 10
python3 CADCards.py 6
You will see the PiFace CAD's backlight turn on and a number of cards appear as well as the text Turns: 0
The aim of the game is to match all the randomly placed pairs by using the PiFace CAD's rocker switch to move left and right and press it in to switch rows. Once the blinking cursor is over the card that you want, press the fourth button from the left to turn the card over. Then move to the card you think is a match for this one and press the fourth button again. If they match, they will be removed from the game, otherwise they will turn back over.
When the game is over your score will be displayed and compared to the previous best score from the CADCardsHighScores file, for the number of cards you played with. If you beat the best score, it will be replaced with your new score for you to try and beat next time.
To reset your high scores, open the CADCardsHighScores file with your favourite text editor
You will see a list of numbers, these are the high scores with the first one being for a 2 card game. Change these number to a high number like 100 and save the file.