updated library creation code to generate a single event for the whole library (instead of events on per-card basis)

This commit is contained in:
Maxmtg
2013-07-04 09:41:42 +00:00
parent cb42cf6ceb
commit 05cc118282

View File

@@ -117,6 +117,7 @@ public class GameNew {
private static void preparePlayerLibrary(Player player, final ZoneType zoneType, CardPool section, boolean canRandomFoil, Random generator) {
PlayerZone library = player.getZone(zoneType);
List<Card> newLibrary = new ArrayList<Card>();
for (final Entry<PaperCard, Integer> stackOfCards : section) {
final PaperCard cp = stackOfCards.getKey();
for (int i = 0; i < stackOfCards.getValue(); i++) {
@@ -149,10 +150,10 @@ public class GameNew {
card.setFoil(iFoil);
}
library.add(card);
newLibrary.add(card);
}
}
library.setCards(newLibrary);
}
// this is where the computer cheats