public class PieceMove
extends java.lang.Object
| Constructor and Description |
|---|
PieceMove(Piece piece,
Direction direction)
Construct a PieceMove with a given Piece and the Direction it is to be moved.
|
| Modifier and Type | Method and Description |
|---|---|
Direction |
getDirection()
Return the Direction Piece is to be moved.
|
Piece |
getPiece()
Return the Piece to be moved.
|
java.lang.String |
toString()
Return the String concatenation of the representations for a piece and a direction.
|
boolean |
tryMove()
Tries to make the given move.
|
public boolean tryMove()
public Piece getPiece()
public Direction getDirection()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()