|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.editev.chess.Square
This class represents a Square on a chess board as a column and row position.
the source here.| Field Summary | |
byte |
column
The column address of this square in the chess board with column=0 meaning file a and column=7 meaning file h in algebraic chess notation. |
byte |
row
The row address of this square in the chess board with row=0 meaning rank 8 in algebraic chess notation. |
| Constructor Summary | |
Square()
Create an empty square |
|
Square(byte column,
byte row)
Create a square with a column and row value. |
|
Square(int column,
int row)
Create a square with an int column and row value. |
|
| Method Summary | |
java.lang.Object |
clone()
Clone an Object that's a Square that's an exact copy of this one. |
Square |
cloneSquare()
Clone a Square that's an exact copy of this one. |
void |
copyFrom(Square square)
Copy another Square into this Square. |
boolean |
equals(java.lang.Object object)
|
java.util.Enumeration |
getEnumeration()
Enumerates all squares in row-major order, start right before the first element. |
java.util.Enumeration |
getEnumeration(byte row,
byte column)
Enumerates all squares in row-major order, start right before the first element. |
boolean |
hasMoreElements()
Implements Enumeration in row-major order. |
boolean |
isValid()
Is this Square inside the board? Squares are valid, Moves are legal.... |
boolean |
isWhite()
Is this a white square? |
java.lang.Object |
nextElement()
Implements Enumeration in row-major order. |
java.lang.String |
toString()
Square in chess notation. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public byte row
public byte column
| Constructor Detail |
public Square()
public Square(byte column,
byte row)
public Square(int column,
int row)
| Method Detail |
public boolean isValid()
public boolean equals(java.lang.Object object)
public java.util.Enumeration getEnumeration()
public java.util.Enumeration getEnumeration(byte row,
byte column)
public boolean hasMoreElements()
public java.lang.Object nextElement()
public java.lang.String toString()
public final boolean isWhite()
public java.lang.Object clone()
public Square cloneSquare()
public void copyFrom(Square square)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||