Package com.amirhn.Moves
Class Move
java.lang.Object
com.amirhn.Moves.Move
The type Move.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
applyOnBoard
(Board board) Apply on board boolean.abstract Location
Gets endpoint location.abstract Location
Gets startpoint location.boolean
Is allowed boolean.boolean
isValidApplyOnBoard
(Board board) Is valid apply on board boolean.protected abstract void
undoOnBoard
(Board board) Undo on board.
-
Field Details
-
type
The Type. -
piece
The Piece.
-
-
Constructor Details
-
Move
Instantiates a new Move.- Parameters:
type
- the typepiece
- the piece
-
-
Method Details
-
isAllowed
Is allowed boolean.- Parameters:
chess
- the chess- Returns:
- the boolean
-
applyOnBoard
Apply on board boolean.- Parameters:
board
- the board- Returns:
- the boolean
-
undoOnBoard
Undo on board.- Parameters:
board
- the board
-
isValidApplyOnBoard
Is valid apply on board boolean.- Parameters:
board
- the board- Returns:
- the boolean
-
getStartpointLocation
Gets startpoint location.- Returns:
- the startpoint location
-
getEndpointLocation
Gets endpoint location.- Returns:
- the endpoint location
-