Package jadex.bdiv3.examples.puzzle
Class MoveComparator
- java.lang.Object
- 
- jadex.bdiv3.examples.puzzle.MoveComparator
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected IBoardboardThe board (required for checking which piece is in a given position).protected java.lang.StringstrategyThe strategy.static java.lang.StringSTRATEGY_ALTER_LONGThe strategy preferring jump moves of different colors.static java.lang.StringSTRATEGY_LONGThe strategy preferring jump moves, but ignoring colors.static java.lang.StringSTRATEGY_NONENo strategy: try moves in order of appearance.static java.lang.StringSTRATEGY_SAME_LONGThe strategy preferring jump moves of same color.
 - 
Constructor SummaryConstructors Constructor Description MoveComparator(IBoard board, java.lang.String strategy)Create a move comparator.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Move move1, Move move2)Compare two moves.
 
- 
- 
- 
Field Detail- 
STRATEGY_NONEpublic static final java.lang.String STRATEGY_NONE No strategy: try moves in order of appearance.- See Also:
- Constant Field Values
 
 - 
STRATEGY_LONGpublic static final java.lang.String STRATEGY_LONG The strategy preferring jump moves, but ignoring colors.- See Also:
- Constant Field Values
 
 - 
STRATEGY_SAME_LONGpublic static final java.lang.String STRATEGY_SAME_LONG The strategy preferring jump moves of same color.- See Also:
- Constant Field Values
 
 - 
STRATEGY_ALTER_LONGpublic static final java.lang.String STRATEGY_ALTER_LONG The strategy preferring jump moves of different colors.- See Also:
- Constant Field Values
 
 - 
boardprotected IBoard board The board (required for checking which piece is in a given position).
 - 
strategyprotected java.lang.String strategy The strategy.
 
- 
 - 
Constructor Detail- 
MoveComparatorpublic MoveComparator(IBoard board, java.lang.String strategy) Create a move comparator.
 
- 
 
-