assertEquals(1, s2.getBestMoves().size());
assertEquals(Queen.of(Hearts.i()), s2.getBestMoves().get(0));
}
public void testNorthTrumps() {
Deal game = new Deal(Spades.i());
game.getPlayer(Direction.WEST_DEPRECATED).init(new Card[] { Nine.of(Clubs.i()), Four.of(Spades.i()) });
game.getPlayer(Direction.NORTH_DEPRECATED).init(new Card[] { Two.of(Spades.i()), Two.of(Hearts.i()) });
game.getPlayer(Direction.EAST_DEPRECATED).init(new Card[] { Three.of(Clubs.i()), Three.of(Diamonds.i()) });
game.getPlayer(Direction.SOUTH_DEPRECATED).init(new Card[] { Six.of(Clubs.i()), Five.of(Diamonds.i()) });
game.play(Nine.of(Clubs.i()));
DoubleDummySolver s = new DoubleDummySolver(game);
s.search();
s.printStats();
s.printOptimalPath();
assertEquals(1, s.getBestMoves().size());
assertEquals(Two.of(Spades.i()), s.getBestMoves().get(0));
Deal game2 = new Deal(Spades.i());
game2.getPlayer(Direction.WEST_DEPRECATED).init(new Card[] { Nine.of(Clubs.i()), Four.of(Spades.i()) });
game2.getPlayer(Direction.NORTH_DEPRECATED).init(new Card[] { Two.of(Hearts.i()), Two.of(Spades.i()) }); // order
// reverted
game2.getPlayer(Direction.EAST_DEPRECATED).init(new Card[] { Three.of(Clubs.i()), Three.of(Diamonds.i()) });
game2.getPlayer(Direction.SOUTH_DEPRECATED).init(new Card[] { Six.of(Clubs.i()), Five.of(Diamonds.i()) });
game2.doNextCard(0);
DoubleDummySolver s2 = new DoubleDummySolver(game2);
s2.search();
assertEquals(1, s2.getBestMoves().size());
assertEquals(Two.of(Spades.i()), s2.getBestMoves().get(0));