|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.japanesechess.record.ShogiPly
public class ShogiPly
Shogi plie representing one handicap or one move of a token. A comment may be attached to a ply.
| Field Summary | |
|---|---|
private PlyActions |
action
|
private byte[] |
board
|
private java.lang.String |
comment
|
private boolean |
handicap
|
private boolean |
hasPromoted
|
private java.lang.String |
notation
|
private boolean |
promoting
|
private Tokens |
token
|
private int |
x1
|
private int |
x2
|
private java.lang.String |
y1
|
private java.lang.String |
y2
|
| Constructor Summary | |
|---|---|
ShogiPly(java.lang.String notation)
Takes a move in standard notation, processes it and sets up the ply. |
|
| Method Summary | |
|---|---|
void |
appendComment(java.lang.String comment)
|
PlyActions |
getAction()
|
byte[] |
getBoard()
Packed board representing the state of the board and reserves after this ply is played. |
java.lang.String |
getComment()
|
java.lang.String |
getNotation()
|
Tokens |
getToken()
|
int |
getX1()
Valid values are 1-9 |
int |
getX2()
Valid values are 1-9 |
java.lang.String |
getY1()
Valid values are a-i |
java.lang.String |
getY2()
Valid values are a-i |
boolean |
isHandicap()
|
boolean |
isHasPromoted()
|
boolean |
isPromoting()
|
private java.lang.String |
processMove(java.lang.String notation)
Takes a move in notation format and populates this ply. |
void |
setAction(PlyActions action)
|
void |
setBoard(byte[] board)
Packed board representing the state of the board and reserves after this ply is played. |
void |
setComment(java.lang.String comment)
No comments on handicap (...) plies. |
void |
setHandicap(boolean handicap)
|
void |
setHasPromoted(boolean hasPromoted)
|
void |
setNotation(java.lang.String notation)
|
void |
setPromoting(boolean promoting)
|
void |
setToken(Tokens token)
|
void |
setX1(int x1)
Valid values are 1-9 |
void |
setX2(int x2)
Valid values are 1-9 |
void |
setY1(java.lang.String y1)
Valid values are a-i |
void |
setY2(java.lang.String y2)
Valid values are a-i |
java.lang.String |
toString()
Returns standard notation for this ply. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private boolean handicap
private boolean hasPromoted
private Tokens token
private int x1
private java.lang.String y1
private PlyActions action
private int x2
private java.lang.String y2
private boolean promoting
private java.lang.String notation
private java.lang.String comment
private byte[] board
| Constructor Detail |
|---|
public ShogiPly(java.lang.String notation)
notation - | Method Detail |
|---|
public byte[] getBoard()
public void setBoard(byte[] board)
board - the board to setpublic boolean isHasPromoted()
public void setHasPromoted(boolean hasPromoted)
hasPromoted - the hasPromoted to setpublic Tokens getToken()
public void setToken(Tokens token)
token - the token to setpublic int getX1()
public void setX1(int x1)
x1 - the x1 to setpublic java.lang.String getY1()
public void setY1(java.lang.String y1)
y1 - the y1 to setpublic PlyActions getAction()
public void setAction(PlyActions action)
action - the action to setpublic int getX2()
public void setX2(int x2)
x2 - the x2 to setpublic java.lang.String getY2()
public void setY2(java.lang.String y2)
y2 - the y2 to setpublic boolean isPromoting()
public void setPromoting(boolean promoting)
promoting - the promoting to setpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean isHandicap()
public void setHandicap(boolean handicap)
handicap - the handicap to setprivate java.lang.String processMove(java.lang.String notation)
notation -
public java.lang.String getComment()
public void appendComment(java.lang.String comment)
comment - the comment to setpublic java.lang.String getNotation()
public void setNotation(java.lang.String notation)
notation - the notation to setpublic void setComment(java.lang.String comment)
comment - the comment to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||