java.io.Serializable
public class Move
extends java.lang.Object
implements java.io.Serializable
Constructor | Description |
---|---|
Move(Coordinate from,
Coordinate to) |
Create a new move
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object other) |
|
Coordinate |
getFrom() |
Get the board coordinates that the piece is moving from
|
Move |
getPreviousMove() |
|
Coordinate |
getTo() |
Get the board coordinates to move a piece to
|
boolean |
isChainMove() |
|
void |
setChainMove(boolean chainMove) |
|
void |
setPreviousMove(Move previousMove) |
public Move(Coordinate from, Coordinate to)
from
- The board position to move a piece fromto
- The board position to move a piece topublic Coordinate getFrom()
public Coordinate getTo()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public boolean isChainMove()
public void setChainMove(boolean chainMove)
public Move getPreviousMove()
public void setPreviousMove(Move previousMove)