org.xistrat.math
Class GoRules

java.lang.Object
  extended by org.xistrat.math.GoRules

public class GoRules
extends java.lang.Object

GoRules checks that a Go game follows the general rules.

Since:
0.6.59

Field Summary
static int EMPTY
           
static int KO
           
static int UNSETTLED
           
 
Constructor Summary
GoRules()
           
 
Method Summary
static java.util.LinkedList<StonesBean> createAllFig(StonesBean stonesBean, java.util.LinkedList<MoveBean> allMoves, FastFace fastFace, int turnOf, int numP)
          used in loading a game reconstructing all positions of all times of a game by help of the start position and all moves
static StonesBean doPut(StonesBean stonesBean, int to, FastFace fastFace, int id)
          used by F4Daemon, engine and gui
static StonesBean doRemove(StonesBean stonesBean, int to, FastFace fastFace, int cont)
          used by F4Daemon, engine and gui
static int[] getScores(int currPlayers, FastFace fastFace, StonesBean stonesBean, java.util.LinkedList<java.lang.Integer> removals, int komiVal)
          WonnaBe Japanese scoring
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final int EMPTY
See Also:
Constant Field Values

UNSETTLED

public static final int UNSETTLED
See Also:
Constant Field Values

KO

public static final int KO
See Also:
Constant Field Values
Constructor Detail

GoRules

public GoRules()
Method Detail

doPut

public static StonesBean doPut(StonesBean stonesBean,
                               int to,
                               FastFace fastFace,
                               int id)
used by F4Daemon, engine and gui

Returns:
the resulting stones

doRemove

public static StonesBean doRemove(StonesBean stonesBean,
                                  int to,
                                  FastFace fastFace,
                                  int cont)
used by F4Daemon, engine and gui

Returns:
the resulting stones

createAllFig

public static java.util.LinkedList<StonesBean> createAllFig(StonesBean stonesBean,
                                                            java.util.LinkedList<MoveBean> allMoves,
                                                            FastFace fastFace,
                                                            int turnOf,
                                                            int numP)
used in loading a game

reconstructing all positions of all times of a game by help of the start position and all moves


getScores

public static int[] getScores(int currPlayers,
                              FastFace fastFace,
                              StonesBean stonesBean,
                              java.util.LinkedList<java.lang.Integer> removals,
                              int komiVal)
WonnaBe Japanese scoring