International Competition in the Programming

ICP '99

Problem of correspondence stage

Pexeso

Pexeso is a card game which can be played by 2, 3 or 4 players. The game is played with 32 pairs of picture cards. Cards in one pair have same pictures drew on them. At the start of the game cards are randomly placed into matrix 8 by 8. Pictures are turned down.

Then players play the game one after another. Each player turns two cards. If there are same pictures on the cards, the player gets this cards and continues in the game. If a player turns cards with different pictures, other players examine position of cards, then cards are turned down by pictures and next player continues in the game. The game stops when all cards are taken by players. The winner is a player with the highest number of pairs of cards.

Write a program which will allow playing pexeso up to 4 players. The user will be able to select number of real players and number of players simulated by the program.

In your program we will evaluate its overall design, user-friendliness and the way in which it will simulate players. Program should faithfully imitate real players who have not perfect memory, who forget in some time and who recognize similar pictures as identical.

If you have not the necessary set of pictures for cards, you can download photos of jury from the competition's web-site as a set of pictures with resolution 48 by 48 pixels.