java.lang.Object
app.utils.pieceplayer.InteractivePiece<M,P>
- Direct Known Subclasses:
LogicalPiece
Interface for moving single piece, to be used with external controllers such as UI.
Override update method to implement custom behavior
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
controls
-
-
Constructor Details
-
InteractivePiece
public InteractivePiece()
-
-
Method Details
-
getPiece
- Returns:
- Controlled game piece
-
getLegalMoves
- Returns:
- List of moves this piece can make
-
makeMove
Make a move with this piece -
update
update is called when state of a piece changes- Parameters:
move
- move that caused the change
-
update
public void update()update is called when state of a piece changes
-