for (int i = 1; i < 4; i++) {
playerPiles.put(i, new LinkedHashSet<UUID>());
}
playerPermanents.put(currentPlayer.getId(), playerPiles);
for (int i = 1; i < 3; i++) {
FilterPermanent filter = new FilterPermanent(
new StringBuilder("the permanents for the ").append(i == 1 ? "first " : "second ").append("pile").toString());
filter.add(new ControllerIdPredicate(currentPlayer.getId()));
Target target;
if (i == 1) {
target = new TargetPermanent(0, Integer.MAX_VALUE, filter, true);
} else {
target = new TargetSecondPilePermanent(playerPiles.get(1), filter);