Interface TwoPhaseMoveState<T>
- Type Parameters:
T
- represents the type of the source and the target of the moves
- All Superinterfaces:
State<TwoPhaseMoveState.TwoPhaseMove<T>>
- All Known Subinterfaces:
TwoPhaseMoveState<T>
,TwoPhaseMoveState<T>
Represents the states of puzzles or two-player games whose moves are
described by two objects, i.e.,
from
and to
. From a user
interface-centric viewpoint, it is suitable for puzzles or two-player games
where moves are made from a source to a target location. Thus, a move is
specified in two phases, each requiring a selection, e.g., two subsequent
mouse clicks are need.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final record
Represents moves that are described by two objects, i.e.,from
andto
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isLegalToMoveFrom
(T from) Returns whether it is possible to make a move from the argument specified.Methods inherited from interface common.State
isLegalMove, makeMove
-
Method Details
-
isLegalToMoveFrom
Returns whether it is possible to make a move from the argument specified.- Parameters:
from
- represents where to move from- Returns:
- whether it is possible to make a move from the argument specified
-