- All Implemented Interfaces:
Piece
public class CheckersPiece
extends Object
implements Piece
-
Field Summary
Fields
(package private) boolean
(package private) boolean
-
Constructor Summary
Constructors
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
-
isUpgraded
boolean isUpgraded
-
-
Constructor Details
-
CheckersPiece
public CheckersPiece(Field position,
int player)
-
Method Details
-
getPosition
public Field getPosition()
- Specified by:
getPosition
in interface Piece
- Returns:
- position this piece is located at
-
isAlive
public boolean isAlive()
- Specified by:
isAlive
in interface Piece
- Returns:
- true if piece is still in game, false otherwise
-
getPlayer
public int getPlayer()
- Specified by:
getPlayer
in interface Piece
- Returns:
- id of player that can play with this piece
-
isUpgraded
public boolean isUpgraded()