Abalone V1.1 - a game of strategy and skill
-------------------------------------------
written in 1995 by Lenz Grimmer

New in this version:
--------------------
- save and load game situations
- better screen update performance
- undo last move

System Requirements
-------------------
- 486DX or better
- 8Megs of RAM
- WIN 3.1x or WIN95 / WIN NT

I know this is pretty heavy for such a simple game, but this is what the
CVI-runtime-engine expects :-(


How to install:
---------------
Run Windows and start the setup program. The installation routine asks for
the installation path and creates a new group "Abalone" in the program
manager. Klick on this icon to run the game ;-)

Note: It seems that sometimes the installation routine fails to create the
correct entry in you WIN.INI - File. If you can't start ABALONE because
the path to the Runtime Engine is missing, you have to add the following
to your WIN.INI:

[cvirt31]
cvirt31=<path_to_where_you_installed_the_runtime-libray>\cvirt31.exe

About the game:
---------------
This is my first attempt to write a game in C.
It is written under LabWindows/CVI from National Instruments, a development
system that is mainly used to create software for measurement purposes.
But as you can see, it could also be misused for games :-)
Sorry for the big runtime-engine, i'll try to port the program to another
C-Language in one of the following versions.
This version does not offer a computer opponent (yet) and it does not check
if one player makes more than one move.
But it could be used with two players, just like a real abalone board.
I use it very often to analyze moves and strategies.
You can change the colors of the marbles. Just click the small color-box
and a palette appears.
Now you can also save and load game positions, it even memorizes the selected
color and score of that game !
It is also possible to edit these saved files with an ASCII-Texteditor
to create usual impossible game situations (eg. 50 white marbles),
the format is pretty simple. I'll explain the data format later in this text.
I've also included three example abalone positions. Note that it is impossible
for player one to make a move !
(Taken from Mark C. Torrance et al, "An Abalone Position for which the game
is undefined", February 3, 1992, Dep. of Computer Science at the MIT)

Legalese:
---------
I distribute this game as cardware. So if you like it, send me an
impressive postcard of your country, i'll appreciate it !
(See adress at the end of this file)
But if you want to support a poor student, money will also be accepted ;-)
For any suggestions or comments, see "About the author" !

Abalone rules:
--------------
Ablone is simple to play. You can push one to three marbles along the board
in six directions:

                          left up       right up
                                  \   /
                             left - Û - right
                                  /   \
                        left down       right down

You can do this by clicking on the marble you want to move and then on the
next field you want to move it to.
If you want to move two or three balls at once, click on the last ball in
this row and "push" the other two in your desired direction.
If you have marked a ball already but want to select another one without
moving, click the right mousebutton inside the playfield to unmark the ball.
The target of the game is to push six opponent's balls off the board.
To push an opponent's ball, you have to have two or three balls (of your
color) in a row. One-on-one does not work. To push two opponent-balls at once
you must have three of your balls in a row. In other words, your row must
be longer than your opponent's row (max. three).

Example:

        Û °             No go, 1:1
        ->

        Û Û °           White pushes black
        ->

        Û Û ° Û         Not possible, black is blocked by white ball
        ->

        Û Û Û °         Yep, it works
        ->

        Û Û Û ° °       Another possible move
        ->

The game checks for (almost all) valid moves, just play around with it and
you will see what I mean.
It is also legal to move a row of two or three of your balls "sideways"
(not in the direction the row is pointing to). In this version, you need
to klick each ball individually and move it in the desired direction.

Planned Features for following versions
---------------------------------------
- Computer opponent (any ideas/algorithms ?)
- Port to LinuX / X-Window-System
- Network Play
- 100% valid move checking
- On-line help with a better explanation of the game rules :-)

About the author
----------------
I am 24 years old and study technical dataprocessing at the Berufsakademie
in Mannheim, Germany. My hobbies are scuba-diving and playing around with
the many possible configuration options of my LinuX-PC.

I'd like to receive suggestions and comments about this little program !

Until the end of 1996 you can reach me via e-mail:

        93ti016@ba-mannheim.de   OR  lenzg@rummelplatz.uni-mannheim.de


or point your WWW-Client to this URL (my homepage at the Berufsakademie):

        http://www.ba-mannheim.de/~local/93ti016

or via snail-mail (The Postcard, remember ?):

        Lenz Grimmer
        Lilienthalstr. 17
        69214 Eppelheim
        Germany

And now have fun playing ABALONE !

Data Format of saved games:
---------------------------

The first two numbers define the RGB-color-values of the player's marbles.
The next two are the score of player one and player two.
After that, there is a row of 61 numbers (0, 1, 2), each representing
the status of one playfield of the board:

  0 - Field is free
  1 - Field is occupied by player 1
  2 - Field is occupied by player 2

I have enumerated the Abalone board in the following way:
Field No.1 is to the top left, numbers increase from left to right and
from top to bottom of the field:

          1   2   3   4   5

        6   7   8   9   10  11

     12  13  14  15  16 ...

               ...

                  ... 48  49  50

        51  52  53  54  55  56

          57  58  59  60  61

By this way it is even possible to create situations that are normally im-
possible (More than 14 balls per player, more than 6 points).
Please note that the program doesn't check for file integrity, so please
be careful when modifying a saved game !
