public class Piece
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected boolean |
white
The piece color (white or black).
|
Constructor and Description |
---|
Piece()
Create a new piece.
|
Piece(boolean white)
Create a new board.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone the object.
|
boolean |
isWhite()
Test, if it is a white piece.
|
void |
setWhite(boolean white)
Set tu true, if it is a white piece.
|
java.lang.String |
toString()
Get the string representation.
|
public Piece()
public Piece(boolean white)
public boolean isWhite()
public void setWhite(boolean white)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object