if (controller != null) {
Map<Permanent, Integer> chosenCards = new HashMap<>(2);
int maxCount = 0;
FilterNonlandPermanent filter = new FilterNonlandPermanent("a nonland permanent " + controller.getName() + " doesn't control");
filter.add(Predicates.not(new ControllerIdPredicate(controller.getId())));
<BUG>PlayerList playerList = game.getState().getPlayerList();
</BUG>
while (!playerList.get().equals(controller.getId()) && controller.isInGame()) {
playerList.getNext();
}

if (controller != null) {
Map<Permanent, Integer> chosenCards = new HashMap<>(2);
int maxCount = 0;
FilterNonlandPermanent filter = new FilterNonlandPermanent("a nonland permanent " + controller.getName() + " doesn't control");
filter.add(Predicates.not(new ControllerIdPredicate(controller.getId())));
PlayerList playerList = game.getState().getPlayerList().copy();
while (!playerList.get().equals(controller.getId()) && controller.isInGame()) {
playerList.getNext();
}
