
            Havannah Gui:
            GUI for Havannah (based on GoGui 0.6) ; LICENCE: GPL
            =====================================================
 
Install:

Installation is not necessary, but you can:
* copy the files to any folder (e.g. c:\Programs\HavannahGui)
* create quickstart on your Desktop and/or Start Menu
* associate .hgf files with hgui.bat (use hgui1.bat with full path) [RECOMMENDED!]

Extensions:
 .sgf for Go
 .hgf for Havannah
 .tgf for Twixt
 .shf for Hex(Gui)

Run:

* double click on HGui.jar 
  (or use HavannahGui.bat)

Keyboard commands:

Ctrl-Left/Right: prev/next move
Ctrl-Up/Down:    prev/next variation
.etc.

Features:

* save .sgf trees
* attach one or two GTP engines (Havannah playing computer opponent) & play against them
* command line option "-2" adds the feature to attach two GTP engines at the same time (*NEW*)
* board size 4..13, swap, resign supported
 
***************** for Experts ****************

Build:

* you need "ant" (install e.g. to c:\ant\, and add "c:\ant\bin" to path)

* you may need environment variables:
  JAVA_HOME=C:\programme\java\jdk1.5.0
  PATH=C:\programme\java\jdk1.5.0\bin;C:\ant\bin;
  (use System panel/Environment to set them permanently, and reboot)
  
* typing "ant" in project root, will build everything (build.xml is used)

Testing:

Attach an engine (e.g. gtpdummy, which is a random player):
* select "attach" from file menu, type filename of your engine .exe (or java -jar xyz.jar),
  e.g. java -jar gtpdummy.jar (it's relative to the directory where HGui was started)
  
====================================================================================================
======= .sgf FILE FORMAT (EXAMPLE WITHOUT VARIATIONS) ==============================================
====================================================================================================

File example:

(;FF[4]GM[Havannah]SZ[8]PW[Player1(W)]PB[Player2(B)];W[a1];B[b2];W[c3];B[d3];W[e3];B[f3];W[g3])

Sgf Properties explained:

FF[4] = sgf file version (4)
SZ    = edge size of the board (e.g. 8, 10) [note: not the diameter is used!]
PW/PB = player name white/black 
SO    = source (littlegolem.net, mindsports.net, etc)
EV    = event (tournament id)


White is player 1 (=first move)
Swap means: the color of the 1st stone on the board is inverted (allowed as 2nd move)


Coordinate System from mindsports.nl is used: 

A1 is the lowest point on the board.
 X coordinates go to the left, Y coordinate go to the right

           (18,18)=S19
         /  \
      /        \
   /              \
 /                   \
|                     |
|                     |
|                     |
|                     |
| (9,0)=J1            |
 \                   /  (0,9)=A10
   \              /
 x    \        /
direction\  /      y direction
          (0,0)=A1


====================================================================================================
======= FILE EXTENSIONS: ===========================================================================
====================================================================================================


File extensions:
 
Ext  Game                                          SGF Game Type
---- --------------------------------------------- -----------
.sgf Go (Smart Go/Game Format)                     GM[1]
.hgf Havannah (Havannah Game Format)               GM[Havannah] (no official game number assigned, yet)
.shf Hex (Smart Hex Format)                        GM[Hex]
.tgf Twixt (Smart Twixt Format)                    GM[Twixt]


====================================================================================================
======= INTERNAL REPRESENTATION OF THE BOARD: ======================================================
====================================================================================================

int arr[19][19];

= 0..18 x 0..18

(0,0)
+-----------------------------+
|                  \          |
|                    \        |
|                      \     <--------- not used
|                        \    |
|                          \  |
|                            \|
|                             |
|\                            |
|  \                          |
|    \                        |
|      \                      |
|    <--------------------------------------not used
|           \                 |
+-----------------------------+ (18,18)


Each field has 6 neighbours: (not 4 of course)

in the array they are:

  *    i
    \  |
      \|
<----- * ----->
       |\ 
       |  \ 
       v   *


Board Indices:

Upper Left Corner (in array)  =  0 / 0 
Middle of the board (in array)=  9 / 9
Lower Right Corner (in array) = 18 / 18



====================================================================================================
======= ACKNOWLEDGEMENTS: ==========================================================================
====================================================================================================

* GoGui is by Markus Enzenberger

* Havannah board painting code is from "Havannah-different-applet" by Joerg Endrullis; 
  used with permission

* Send comments to "ab" (plid=6603) in little golem forum.
