Toto je anglicka verze. Muzete vyzkouset ceskou verzi

Program xpexeso - the game with 64 cards

Petr Olsak

The winner is usually the player with a better memory. You have to remember the position and contents of cards. The program xpexeso emulates the classical game PEXESO, which is widely played by children.

The rules of the game

The game is for two or more players. If the xpexeso program is used, some player(s) can be substituted by computer. The game includes 64 picture cards coupled into pairs. There are 32 pictures (the same picture on each pair). The backside of all cards is common for all cards.

The cards are mixed and all cards are dealt to the table backside up into 8x8 rectangle on the start of the game. The players change periodically with his playing. The playing of one player consists from one or more moves. One move is turning out of two arbitrary cards. The move is successful if and only if these two cards have the same picture. In this case, the player removes this pair from the table and adds one point to his score. The player continue with next move until his moves are successful. If the move is not successful, the player have to turn back the two shown cards on the same place where they were before this move. Then the next player starts his playing. If the table is empty the game is over. The winner is the player with maximum of points (it means with maximum of successful moves during the game). The players cannot do any notices about cards into "external memory" during game. They have to store all information only in his own memory.

The Source

The program is available in source codes on ftp site of department of mathematic FEL CVUT in the archive file xpexeso.tar.gz. Do $zcat xpexeso.tar.gz| tar xvf -; cd xpexeso and read the file README.

There exists the RPM package by Zdenek Pytela too. You can download it from ftp://ftp.phil.muni.cz/pub/local/xpexeso.

Features

The screen shot of the program with the picture set "vecernicek":

screen-shot

The history of program

The idea to write the PEXESO program came from my son Mirek (8 year old). I said: If you draw 32 pictures using Gimp then I write this program. Unfortunately, he has drawn the pictures during few days. This was a reason why I have started with study of textbook by Ales Limpouch (Programming in X Window System) and I started with writing my work. The fact that the PEXESO was implemented by Petr Blaha for svgalib library was not usable for me, because we need the program for X. His source code was not employed and I wrote all code once again. To write the platform independent algorithms and to implement the "human behavior" of computer-player was the more simple task. In version for text terminal (without pictures) was the game written and tested during one day. Next two weeks, I struggled with widgets, events and similar objects of X Athena.

The aim of this work was to make an usable game for X Window System and to stimulate my son to C programming and UNIX principles. This is the reason why the comments in source code are in Czech language only. I believe that the aim was reached because Mirek has started with study of first textbook about programming in C.

The picture sets

Many of distributed picture sets were made by brothers Petr and Pavel Matula in 1994. These sets are distributed with their program pexeso for MS DOS. This program is free and available without source codes on Pavel Matula WWW page. The implemetation of graphics is famous because the old DOS machines were assumed thus only 16 colors are used for all pictures alltogether. Every picture is placed only in 56x56 pixels square. With kind permission of Pavel Matula are these sets distributed in xpexeso program.

If you make a new interesting picture set, I like to include it into xpexeso distribution. We have many power tools for making pictures now (Gimp for example) and we are not limited to 16 colors only.

The picture sets distributed with xpexeso program: