Package com.amirhn.Moves
Class Move
java.lang.Object
com.amirhn.Moves.Move
The type Move.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanapplyOnBoard(Board board) Apply on board boolean.abstract LocationGets endpoint location.abstract LocationGets startpoint location.booleanIs allowed boolean.booleanisValidApplyOnBoard(Board board) Is valid apply on board boolean.protected abstract voidundoOnBoard(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
-