|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xistrat.math.ChessRules
public class ChessRules
ChessRules checks that a Chess game follows the general rules.
ExportData
,
(float, float, FigurData, int, int, int, int)
Constructor Summary | |
---|---|
ChessRules()
|
Method Summary | |
---|---|
static java.util.LinkedList<FigurData[]> |
createAllFig(FigurData[] _figures,
java.util.LinkedList allMoves,
FastFace fastFace)
used in loading a game reconstructing all positions of all times of a game by help of the start position and all moves |
static FigurData[] |
doMove(int mode,
FigurData[] figs,
int from,
int to,
FastFace fastFace)
this method is used by XiStratPanel and Engine |
static FigurData[] |
doMove(int mode,
FigurData[] figs,
int from,
int to,
FastFace fastFace,
int id)
used by F4Daemon, engine and gui |
static int |
getNextEdge(FigurData fig,
FastFace fastFace)
Deprecated. now use getNextFEdge |
static int |
getNextF(FigurData fig,
FastFace fastFace)
used to compute the next edge for figure D (used in ExportData for figure specific groups...) |
static int |
getNextFEdge(FigurData fig,
FastFace fastFace)
edge labels start at 0 (for ExportData permutations at 1 though later on in the process) |
static int |
getNextFEdge(int stand,
int location,
int distIE,
FastFace fastFace)
edge labels start at 0 |
static int |
getNextP(FigurData fig,
FastFace fastFace)
used to compute the next edge for figure D |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChessRules()
Method Detail |
---|
public static FigurData[] doMove(int mode, FigurData[] figs, int from, int to, FastFace fastFace, int id)
mode
- 0 use null (engine)
, 1 use kill (gui)
, 2 use kill and do some rule checking (serverside)figs
- from
- should be changed to represent locations in order to be able to deal with piece E type as wellto
- should also be changed (see from)fastFace
- id
-
public static FigurData[] doMove(int mode, FigurData[] figs, int from, int to, FastFace fastFace)
mode
- 0 use null (engine)
, 1 use kill (gui)figs
- from
- should be changed to represent locations in order to be able to deal with piece E type as wellto
- should also be changed (see from)fastFace
-
public static int getNextEdge(FigurData fig, FastFace fastFace)
edge labels start at 0 (for permutations at 1 though)
fig
- fig.stand is in [0, polygons-1]public static int getNextFEdge(FigurData fig, FastFace fastFace)
fig
- fig.stand is in [0, faces - 1]
assumes fig is type D or E
public static int getNextFEdge(int stand, int location, int distIE, FastFace fastFace)
stand
- is in [0, faces - 1]
location
- may NOT point to a hole
public static int getNextP(FigurData fig, FastFace fastFace)
public static int getNextF(FigurData fig, FastFace fastFace)
public static java.util.LinkedList<FigurData[]> createAllFig(FigurData[] _figures, java.util.LinkedList allMoves, FastFace fastFace)
reconstructing all positions of all times of a game by help of the start position and all moves
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |