Concentration

Analysis: Game Description

Concentration (aka Memory) is a card game for two players. The cards are laid face down on the playing surface (i.e., board) in a rectangular pattern. The goal is to find as many matches as possible. Two cards match if their face values are the same and their suits are the same color (red or black).

Players alternate turns. During a turn a player flips over two cards, one at a time. If the cards match, the player removes them from the board and flips over two more cards. The player's turn continues as long as the player keeps finding matches. When the player has flipped over two cards that don't match, the player's turn ends and the non-matching cards are flipped back (so the face value and suit are no longer visible).

The game ends when all the cards have been removed from the board. The player with the most number of matches wins.

Design

What classes are needed?

 

 

UML diagrams for classes we will write

 

 

 

 

 

 

 

 

 

 

UML diagram for relationships between the classes

 

 

 

 

 

 

 

 

 

 

 

 

A more complete description of each class: the javadoc for all the classes

Coding

Testing

Write test classes for each of the instantiable classes.  Test the interactions between classes as well as the game as a whole.

Deployment/Operation/Maintenance

Are there bugs to fix?  Are there features we'd like to add?