trix.c
is a solitaire game, sort of a puzzle.
The purpose of the game is to compose figures using the colored triangles. Each triangle is divided into three colored triangle; one color per "side". There are 76 triangles which cover all the possible combinations of three colors out of six. The number of colors (six) is a compromise between a reasonably high number of pieces, and the complexity of the game.
Few
figures
are included as examples of what can be done.
The figure below is an example.
Initially the pieces are stored in the upper part of the window. They can be dragged on the board, in the lower part of the window, with the mouse. A piece is rotated by clicking on it with the mouse.
There are only two rules for this game:
Before you can play you need to
# Compiler Flags
CFLAGS =
# X LIBRARY (uncomment your flavor)
XLIB = -L/usr/X11R6/lib -lX11
# XLIB = -L/usr/lib -lX11
# Xlib = -L/usr/openwin/lib -lX11
# X Include (uncomment your flavor)
XINC =
# XINC = -I/usr/openwin/include
trix: trix.c
cc -o trix trix.c $(XINC) -lm $(XLIB)
$ trix trix.dat
It is possible to save the status of the current game;
this is written in the file trix.dat
in the current
directory.
It is also possible to start the game with a saved configuration, just
type the configuration file on the command line:
$ trix trix.dat
Many features are missing:
The
program
is still in a crude form. It uses only the basic X11 library and
compiles (and run) under Linux, DigitalUnix, and Solaris.
Marco Corvi - 1999