Modifier and Type | Field and 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 and Description |
---|
MoveComparator(IBoard board,
java.lang.String strategy)
Create a move comparator.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(Move move1,
Move move2)
Compare two moves.
|
public static final java.lang.String STRATEGY_NONE
public static final java.lang.String STRATEGY_LONG
public static final java.lang.String STRATEGY_SAME_LONG
public static final java.lang.String STRATEGY_ALTER_LONG
protected IBoard board
protected java.lang.String strategy
public MoveComparator(IBoard board, java.lang.String strategy)