VDB Janus Chess for Unix
Version 1.0 Revision 7
6. Rules of janus chess
7. Interface guide
8. Technical explanation of the program
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.
You can download it under the URL: http://www.vdb1.com/jchess1.0.7.tar.gz
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
To start the program you need to type the following:
You can also start the program without "make install"
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.
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
The Janus is the only piece that is able to checkmate the other king alone.
All other rules are identically to chess.
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.
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.
The files in the directory filenom are not written by myself.
That files contain a separate copyright remark.
All other files are distributed under the Gnu General Public License(GPL) Version 2
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