Package jadex.bdiv3.examples.puzzle
Class MoveComparator
- java.lang.Object
-
- jadex.bdiv3.examples.puzzle.MoveComparator
-
-
Field Summary
Fields Modifier and Type Field Description protected IBoard
board
The board (required for checking which piece is in a given position).protected java.lang.String
strategy
The strategy.static java.lang.String
STRATEGY_ALTER_LONG
The strategy preferring jump moves of different colors.static java.lang.String
STRATEGY_LONG
The strategy preferring jump moves, but ignoring colors.static java.lang.String
STRATEGY_NONE
No strategy: try moves in order of appearance.static java.lang.String
STRATEGY_SAME_LONG
The strategy preferring jump moves of same color.
-
Constructor Summary
Constructors Constructor Description MoveComparator(IBoard board, java.lang.String strategy)
Create a move comparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(Move move1, Move move2)
Compare two moves.
-
-
-
Field Detail
-
STRATEGY_NONE
public static final java.lang.String STRATEGY_NONE
No strategy: try moves in order of appearance.- See Also:
- Constant Field Values
-
STRATEGY_LONG
public static final java.lang.String STRATEGY_LONG
The strategy preferring jump moves, but ignoring colors.- See Also:
- Constant Field Values
-
STRATEGY_SAME_LONG
public static final java.lang.String STRATEGY_SAME_LONG
The strategy preferring jump moves of same color.- See Also:
- Constant Field Values
-
STRATEGY_ALTER_LONG
public static final java.lang.String STRATEGY_ALTER_LONG
The strategy preferring jump moves of different colors.- See Also:
- Constant Field Values
-
board
protected IBoard board
The board (required for checking which piece is in a given position).
-
strategy
protected java.lang.String strategy
The strategy.
-
-
Constructor Detail
-
MoveComparator
public MoveComparator(IBoard board, java.lang.String strategy)
Create a move comparator.
-
-