|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcheckers.model.Piece
public class Piece
This is an abstract class representing any piece that know about it's color and possible moves and captures
Constructor Summary | |
---|---|
Piece(int c,
int t)
The constructor for this piece |
Method Summary | |
---|---|
int |
getColor()
This method returns the color of this piece |
int |
getType()
Returns the type of the piece |
void |
setType(int t)
Sets the Piece's type (SINGLE or KING) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Piece(int c, int t)
c
- the color for this piece (as defined by constants Piece.WHITE
and Piece.BLUE)t
- Type of the piece (as defined by constants Piece.SINGLE and
Piece.KING)Method Detail |
---|
public int getType()
public int getColor()
public void setType(int t)
t
- Type for this piece
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |