: VDB Janus Chess Documentation

VDB Janus Chess for Unix

Documentation

Version 1.0

Contents

1. Introduction
2. Installation
3. Start
4. Troubleshooting
5. Rules of janus chess
6. Interface guide
7. Technical explanation of the program
8. License

1. Introduction

Janus Chess is a game very similar to chess, there is one aditional piece called janus that can move like a bishop and a knight.

2. Installation

You should have installed developer support for Linux. You need g++, Xaw3d.lib (Athena Widget Set 3D library), headers for developing X software, the xpm-library and the Standard Template Library. If your system is not particularly old, everything should be included in your Unix distribution but it might not be installed yet.
To install this program type the following
cd jchess/src
./configure
make
Alternatively you can also type install.

3. Start

To start the program you need to type the following:
cd jchess
xrdb Jchess
./jchess
If you do not want to type xrdb Jchess every time you start the program you can add the following lines to your .bash_profile file:
XAPPLRESDIR=.
export XAPPLRESDIR

4. Troubleshooting

You cannot install the game

Make sure you have installed all necessary components like g++, 3D-Athena Widget Set-Library, pthread-library, development-headers for X-Window programming, the Standard Template Library. If you do not have the Standard Template Library you can define the functions min(int,int) and max(int,int) manually. If you cannot run the make file successfully you might have to adjust the path for libraries and headers. Use the g++-options -Iheaderpath and -Llibrarypath for this.

You can install the game but cannot start it

Look at first if you have done everything mentioned under 3. Start the program from the console because you see any error messages the program prints before exiting.

5. Rules of Janus Chess

This game is really an extension of ordinary chess. Both player have one additional piece, called Janus. The 'Janus' can move like a knight and a bishop together, it also looks like a combination of knight and bishop. At the beginning the 'Janus' is located between knight and rock. There are two 'Janusses' for every player so the field extends to 10x8. The Janus is the only piece that is able to checkmate the other king alone. All other rules are identically to chess.

7. Interface Guide

Most of the interface is self-explanatory. But there are some points that should be explained.
If you play against the computer and want to take back your last move, it is easier to chose "Move - Last own". This returns to your last own move.
This program supports "Lazy drag and drop". If you press the middle button of your mouse, the icon is glued to the mouse pointer. You drop the icon with another click on the middle mouse button.

8.Technical Explanation of the program

This game is developed with xlib, X Toolkit Intrinsics, Athena Widget Set, pthread and xpm. I use also a file selector widget that was not written by myself (FileNom.c). The pieces on the board are designed as C++-classes. If you move a piece to the field x,y, you have to call the appropriate piece that it is supposed to move to the field. The piece will eventually delete another piece that is located on this position. For this functionality the class CCounter defines an abstract base class CPlayfield that defines the methods to draw and delete an icon on the board. The class CPlayfield is implemented by CBoardview which uses the class CIcon to support drag and drop and to draw icon on the screen. The class CBoardview defines an abstract class CGame with the methods to draw an empty board and to convert a piece value to an icon. The class CBoardview is derived from this class and implements this methods. CBoardview may be uses for all board games. It is application-independent. It defines methods for drag and drop, new drawing of the board, resizing and so on. The class Ccchess is derived from CGame and is the real application class for this game. Ccchess contains variables and functions that are important for the game itself not so much for the graphical interface. Those functions are defined in the file cchess.cpp.

The program starts initially a second thread that calculates the computer moves. The communication with the main thread is done with pipes.

9. License

The files IconSel.h,IconSelP.h and IconSel.c are distributed under the Gnu Library General Public License. All other files are distributed under the Gnu General Public License(GPL).

Hereby I encourage all people to develop free software since I think this is a great idea and for the benefit of every person.

Tim vor der Brueck
brueck@dfki.uni-sb.de