|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface has to be implemented by any chess piece.
Field Summary | |
static byte |
BISHOP
|
static byte |
BLACK
|
static byte |
KING
|
static byte |
KNIGHT
|
static byte |
PAWN
|
static byte |
QUEEN
|
static byte |
ROOK
|
static byte |
WHITE
|
Method Summary | |
byte |
getColor()
Get the color of this piece. |
byte |
getType()
Get the type of this piece. |
byte |
getTypeAndColor()
Get type and color as 1 byte. |
boolean |
isWhite()
Check, if this piece is white. |
void |
setColor(byte color)
Set the color of this piece. |
void |
setType(byte type)
Set the type of this piece. |
Field Detail |
public static final byte BLACK
public static final byte WHITE
public static final byte PAWN
public static final byte BISHOP
public static final byte KNIGHT
public static final byte ROOK
public static final byte QUEEN
public static final byte KING
Method Detail |
public byte getType()
public void setType(byte type)
type
- The new type of this piece.public byte getColor()
public void setColor(byte color)
The
- new color of this piece.public boolean isWhite()
public byte getTypeAndColor()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |