Quote Originally Posted by jdarling
Looks interesting, out of curiousity what version of Lua are you using and who's wrappers?

Also a little background on what the game actually is or how it is played (from start to finish) would be nice. I have having to google or wikipedia every IOTD and entry
I am using Lua 5 + the pascal headers I got from here:

http://www.matrix44.de/lua/

I am using my own Lua classes + utilities (with the Lua.pas API) to actually use Lua :-)

Sorry about not explaining about Abalone :-)

Abalone is played like this:

Object of the game:
On a hexagonal board (radius 5) two to six players have armies of marbles. Players take turns "pushing" 1, 2 or 3 linearly connected marbles, attempting to push their opponents' marbles off the board. First player to push 6 of their opponent's marbles off the board wins. In the 3+ player version, the 6 marbles may be any combination of 6 opponents' marbles.

Initial board layout:

o o o o o
o o o o o o
. . o o o . .
. . . . . . . .
. . . . . . . . .
. . . . . . . .
. . x x x . .
x x x x x x
x x x x x

This is the standard two player layout.

Movement:
You may move a group of 1, 2, or 3 adjacent marbles of your color (a group of 3 marbles must be in a straight line) one space in any one of the six possible directions.
Examples of legal moves:

One marble
. . . . . . . . . . . . . . . .
. . . . x . . . . => . . . . . x . . .
. . . . . . . . . . . . . . . .

Two marbles "forward"
. . . . . . . . . . . . . . . .
. . . . x x . . . => . . . . . x x . .
. . . . . . . . . . . . . . . .

Two marbles "sideways"
. . . . . . . . . . . x x . . .
. . . . x x . . . => . . . . . . . . .
. . . . . . . . . . . . . . . .

Three marbles "forward"
. . . . . . . . . . . . . . . .
. . . . x x x . . => . . . . . x x x .
. . . . . . . . . . . . . . . .


Three marbles "sideways"
. . . . . . . . . . . x x x . .
. . . . x x x . . => . . . . . . . . .
. . . . . . . . . . . . . . . .


I haven't implemented the "sideways" or "broadside" move yet.

A group of two or three marbles may push an opponent's smaller group when moving in a direction that the line is pointing (i.e., not when moving "sideways").

Thus, the three possible pushes are:

Two push one
. . . . . . . . . . . . . . . .
. . . . x x o . . => . . . . . x x o .
. . . . . . . . . . . . . . . .

Three push one
. . . . . . . . . . . . . . . .
. . . x x x o . . => . . . . x x x o .
. . . . . . . . . . . . . . . .

Three push two
. . . . . . . . . . . . . . . .
. . . x x x o o . => . . . . x x x o o
. . . . . . . . . . . . . . . .

Marbles can be pushed off of the board, like so:
One 'o' piece is removed
. . . . . . . . . . . . . . . .
. . . . x x x o o => . . . . . x x x o
. . . . . . . . . . . . . . . .
Once you have pushed six of your opponent's marbles off of the board, you win!

Cheers,
Paul.