// now keep only those that result in a win or loss.
MoveList urgentMoves = new MoveList();
boolean currentPlayer = !lastMove.isPlayer1();
for (Move m : allMoves) {
TwoPlayerMove move = (TwoPlayerMove) m;
// if its not a winning move or we already have it, then skip
if ( Math.abs(move.getValue()) >= WINNING_VALUE && !contains(move, urgentMoves) ) {
move.setUrgent(true);
move.setPlayer1(currentPlayer);
move.setPiece(new GamePiece(currentPlayer));
urgentMoves.add(move);
}
}
return urgentMoves;
}