Concentration
An object-oriented implementation of the game Concentration
Rules
Any deck of playing cards may be used, although there are also commercial sets of cards with images. The rules given here are for a standard deck of 52 cards, which are normally laid face down in four rows of 13 cards each.[2] The two jokers may be included for a total of six rows of nine cards each.
Additional packs can be used for added interest. Standard rules need not be followed: the cards can be spread out anywhere, such as all around a room.
In turn, each player chooses two cards and turns them face up. If they are of the same rank and color (e.g. six of hearts and six of diamonds, queen of clubs and queen of spades, or both jokers, if used) then that player wins the pair and plays again. If they are not of the same rank and color, they are turned face down again and play passes to the player on the left. Rules can be changed here too: it can be agreed before the game starts that matching pairs be any two cards of the same rank, a color-match being unnecessary, or that the match must be both rank and card suit.
The game ends when the last pair has been picked up. The winner is the person with the most pairs. There may be a tie for first place.