(Player player, final ZoneType zoneType, CardPool section, boolean canRandomFoil)
| 198 | } |
| 199 | |
| 200 | private static void preparePlayerZone(Player player, final ZoneType zoneType, CardPool section, boolean canRandomFoil) { |
| 201 | PlayerZone library = player.getZone(zoneType); |
| 202 | List<Card> newLibrary = new ArrayList<>(); |
| 203 | for (final Entry<PaperCard, Integer> stackOfCards : section) { |
| 204 | final PaperCard cp = stackOfCards.getKey(); |
| 205 | for (int i = 0; i < stackOfCards.getValue(); i++) { |
| 206 | final Card card = Card.fromPaperCard(cp, player); |
| 207 | |
| 208 | // Assign card-specific foiling or random foiling on approximately 1:20 cards if enabled |
| 209 | if (cp.isFoil() || (canRandomFoil && MyRandom.percentTrue(5))) { |
| 210 | card.setRandomFoil(); |
| 211 | } |
| 212 | card.setCollectible(true); |
| 213 | |
| 214 | newLibrary.add(card); |
| 215 | } |
| 216 | } |
| 217 | library.setCards(newLibrary); |
| 218 | } |
| 219 | |
| 220 | private void prepareAllZones(final Game game) { |
| 221 | // need this code here, otherwise observables fail |
no test coverage detected