I created back end and front end code for a card game which tests the user’s memory. The goal of the game is to “flip” playing cards over by clicking on them, and to make matches by remembering what values the cards contain after they flip back over. I created the back end of this program by using inheritance which dynamically allows different values of cards to be created by their suite. The model of the game simply uses arrays to compare cards to see if they match, and then utilizes the Observer Design Pattern to update the GUI. The GUI displays all of the cards face down, and activates a timer after two cards are clicked. After the timer is finished, the cards are compared for equality, and they are either flipped back over or removed from the board.
This game’s logic is finished, and will allow a user to play and finish a game, but it is still a work in progress. Eventually I am going to add sound effects, custom images for the cards, and other features like allowing the user to select how many cards they want on the board.
Update: On 6-23-2014
I uploaded a new version which contains updated graphics for the front and backs of the playing cards. I also added a new feature which allows the user to select which values they want played in the game. Lastly I added sound effects for when the game starts, ends, and when the cards are matched or flipped over.
I am still planning on adding additional features and functions to the game when time allows.