|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.util.igo.IgoBase
The base class for different Igo modules. This is used in modules such as IgoFuseki and IgoProverbs.
Field Summary | |
(package private) int |
absLine
value of the absolute lines on board. |
int |
actCnt
convinent variables. |
static int |
AKI
Value of the empty point. |
int |
boardSize
Size of the board, the value is always 19 in Moyoman. |
int[] |
col
Color info of the board (AKI/KURO/SIRO/EDGE). |
VecInt |
comStone
a vector to store the positions of all com's stone. |
int |
d1
variables to access neighbors. |
int |
d11
variables to access neighbors. |
int |
d111
variables to access neighbors. |
int |
d117
variables to access neighbors. |
int |
d118
variables to access neighbors. |
int |
d17
variables to access neighbors. |
int |
d18
variables to access neighbors. |
int |
d2
variables to access neighbors. |
int |
d22
variables to access neighbors. |
int |
d222
variables to access neighbors. |
int |
d225
variables to access neighbors. |
int |
d226
variables to access neighbors. |
int |
d25
variables to access neighbors. |
int |
d26
variables to access neighbors. |
int |
d3
variables to access neighbors. |
int |
d33
variables to access neighbors. |
int |
d333
variables to access neighbors. |
int |
d336
variables to access neighbors. |
int |
d338
variables to access neighbors. |
int |
d36
variables to access neighbors. |
int |
d38
variables to access neighbors. |
int |
d4
variables to access neighbors. |
int |
d44
variables to access neighbors. |
int |
d444
variables to access neighbors. |
int |
d445
variables to access neighbors. |
int |
d447
variables to access neighbors. |
int |
d45
variables to access neighbors. |
int |
d47
variables to access neighbors. |
int |
d5
variables to access neighbors. |
int |
d55
variables to access neighbors. |
int |
d555
variables to access neighbors. |
int |
d6
variables to access neighbors. |
int |
d66
variables to access neighbors. |
int |
d666
variables to access neighbors. |
int |
d7
variables to access neighbors. |
int |
d77
variables to access neighbors. |
int |
d777
variables to access neighbors. |
int |
d8
variables to access neighbors. |
int |
d88
variables to access neighbors. |
int |
d888
variables to access neighbors. |
static int |
EDGE
Value of the boundary line. |
static int |
EDGE_M
Value of the boundary line for group. |
static int |
IRO_KEI
Value of color exchange. |
static int |
KURO
Value of the black stone. |
int |
posLimit
index of the active limit point. |
int |
posStart
index of the first active point. |
static int |
SIRO
Value of the white stone. |
int |
sizeBlk
convinent variables. |
int |
sizeHan
convinent variables. |
int |
sizeP1
convinent variables. |
int |
tanMe
convinent variables. |
int |
tanOp
convinent variables. |
(package private) int |
tenCnt
Total count of the points. |
Constructor Summary | |
IgoBase()
Constructor |
|
IgoBase(int size)
Constructor |
Method Summary | |
int |
absYokoTate(int pos)
Get absloute line value. |
boolean |
aki(int p)
Check a point is empty or not. |
boolean |
aki(int p1,
int p2)
Check 2 points are all empty or not. |
boolean |
aki(int p1,
int p2,
int p3)
Check 3 points are all empty or not. |
boolean |
aki(int p1,
int p2,
int p3,
int p4)
Check 4 points are all empty or not. |
boolean |
aki(int p1,
int p2,
int p3,
int p4,
int p5)
Check 5 points are all empty or not. |
boolean |
aki(int p1,
int p2,
int p3,
int p4,
int p5,
int p6)
Check 6 points are all empty or not. |
boolean |
aki(int p1,
int p2,
int p3,
int p4,
int p5,
int p6,
int p7)
Check 7 points are all empty or not. |
boolean |
aki4Slant4(int val,
int m)
Check the sum of the 8 neighbors is the asking value or not. |
void |
arrClone(Object obj)
Clone arrays. |
int |
ccTable(char c1,
char c2)
Get positon from 2 chars. |
int |
ccTable(String str)
Get positon from a string. |
void |
clearColor()
Clear the color data. |
Object |
clone()
Get clone object. |
boolean |
empty(int pos)
Check a position is empty or not. |
boolean |
empty4(int pos)
Check the 4 neighbors are empty or not. |
boolean |
empty8(int pos)
Check the 8 neighbors are empty or not. |
int |
igoPos(int moX,
int moY)
Get the position of Igo from Moyoman's (X,Y) coordinate. |
void |
info(String msg)
Output the info. |
boolean |
iro(int c,
int p1,
int p2)
Check 2 points are all the asking color or not. |
boolean |
iro4(int val,
int m)
Check the sum of the 4 neighbors is the asking value or not. |
boolean |
iroSlant4(int val,
int m)
Check the sum of the 4 slant neighbors is the asking value or not. |
int |
moyoX(int pos)
Get the horizontal value of Moyoman from a position of Igo. |
int |
moyoY(int pos)
Get the vertical value of Moyoman from a position of Igo. |
void |
setBoardSize(int size)
Set the size of board and related variables. |
void |
setData(VecInt kuro,
VecInt siro,
boolean kuroNext)
Set the data of the board. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AKI
public static final int KURO
public static final int SIRO
public static final int EDGE
public static final int EDGE_M
public static final int IRO_KEI
public int boardSize
public int[] col
int absLine
int tenCnt
public int posStart
public int posLimit
public int d1
public int d2
public int d3
public int d4
public int d5
public int d6
public int d7
public int d8
public int d11
public int d22
public int d33
public int d44
public int d17
public int d18
public int d25
public int d26
public int d36
public int d38
public int d45
public int d47
public int d55
public int d66
public int d77
public int d88
public int d111
public int d222
public int d333
public int d444
public int d117
public int d118
public int d225
public int d226
public int d336
public int d338
public int d445
public int d447
public int d555
public int d666
public int d777
public int d888
public int sizeP1
public int sizeHan
public int sizeBlk
public int actCnt
public int tanOp
public int tanMe
public VecInt comStone
Constructor Detail |
public IgoBase()
public IgoBase(int size)
size
- Size of the board.Method Detail |
public Object clone()
clone
in class Object
public void arrClone(Object obj)
public void setBoardSize(int size)
size
- The size of the Board.public boolean empty(int pos)
pos
- Index of the position.
public boolean empty4(int pos)
pos
- Index of the position.
public boolean empty8(int pos)
pos
- Index of the Position.
public int moyoX(int pos)
pos
- Index of the position.
public int moyoY(int pos)
pos
- Position of Igo.
public int igoPos(int moX, int moY)
moX
- horizontal value of the Moyoman.moY
- vertical value of the Moyoman.
public void clearColor()
public boolean aki(int p)
public boolean aki(int p1, int p2)
p1
- Position of the point 1.p2
- Position of the point 2.
public boolean aki(int p1, int p2, int p3)
p1
- Position of the point 1.p2
- Position of the point 2.p3
- Position of the point 3.
public boolean aki(int p1, int p2, int p3, int p4)
p1
- Position of the point 1.p2
- Position of the point 2.p3
- Position of the point 3.p4
- Position of the point 4.
public boolean aki(int p1, int p2, int p3, int p4, int p5)
p1
- Position of the point 1.p2
- Position of the point 2.p3
- Position of the point 3.p4
- Position of the point 4.p5
- Position of the point 5.
public boolean aki(int p1, int p2, int p3, int p4, int p5, int p6)
p1
- Position of the point 1.p2
- Position of the point 2.p3
- Position of the point 3.p4
- Position of the point 4.p5
- Position of the point 5.p6
- Position of the point 6.
public boolean aki(int p1, int p2, int p3, int p4, int p5, int p6, int p7)
p1
- Position of the point 1.p2
- Position of the point 2.p3
- Position of the point 3.p4
- Position of the point 4.p5
- Position of the point 5.p6
- Position of the point 6.p7
- Position of the point 7.
public boolean iro(int c, int p1, int p2)
c
- The asking Color.p1
- Position of the point 1.p2
- Position of the point 2.
public boolean iro4(int val, int m)
val
- The asking value.m
- The target position.
public boolean iroSlant4(int val, int m)
val
- The asking value.m
- The target position.
public boolean aki4Slant4(int val, int m)
val
- The asking value.m
- The target position.
public void setData(VecInt kuro, VecInt siro, boolean kuroNext)
kuro
- Array of black stone.siro
- Array of white stone.kuroNext
- True if next turn is for black.public int ccTable(char c1, char c2)
c1
- The char data of horizontal.c2
- The char data of vertical.
public int ccTable(String str)
str
- The string data of the position
public int absYokoTate(int pos)
pos
- Position of the board.
public void info(String msg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |