diff options
author | jbion <joffrey.bion@amadeus.com> | 2016-12-22 01:46:40 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2016-12-22 01:46:40 +0100 |
commit | d89d26144458cde313ec4e21fcefd6c2ea9a0d6c (patch) | |
tree | 8206a8de87e6c2baa2a06423da8c189fdec43be8 | |
parent | Improve game steps management (diff) | |
download | seven-wonders-d89d26144458cde313ec4e21fcefd6c2ea9a0d6c.tar.gz seven-wonders-d89d26144458cde313ec4e21fcefd6c2ea9a0d6c.tar.bz2 seven-wonders-d89d26144458cde313ec4e21fcefd6c2ea9a0d6c.zip |
Fix unsupported remove operation in assignBoards()
-rw-r--r-- | src/main/java/org/luxons/sevenwonders/game/data/GameDefinition.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/luxons/sevenwonders/game/data/GameDefinition.java b/src/main/java/org/luxons/sevenwonders/game/data/GameDefinition.java index 5ab1a13f..2e43b370 100644 --- a/src/main/java/org/luxons/sevenwonders/game/data/GameDefinition.java +++ b/src/main/java/org/luxons/sevenwonders/game/data/GameDefinition.java @@ -54,8 +54,9 @@ public class GameDefinition { Collections.shuffle(randomizedWonders, settings.getRandom()); List<Board> boards = new ArrayList<>(orderedPlayers.size()); - for (Player player : orderedPlayers) { - WonderDefinition def = randomizedWonders.remove(0); + for (int i = 0; i < orderedPlayers.size(); i++) { + Player player = orderedPlayers.get(i); + WonderDefinition def = randomizedWonders.get(i); Wonder w = def.create(settings); Board b = new Board(w, player, settings); boards.add(b); |