summaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorjbion <joffrey.bion@amadeus.com>2016-12-22 01:46:40 +0100
committerjbion <joffrey.bion@amadeus.com>2016-12-22 01:46:40 +0100
commitd89d26144458cde313ec4e21fcefd6c2ea9a0d6c (patch)
tree8206a8de87e6c2baa2a06423da8c189fdec43be8 /src/main/java
parentImprove game steps management (diff)
downloadseven-wonders-d89d26144458cde313ec4e21fcefd6c2ea9a0d6c.tar.gz
seven-wonders-d89d26144458cde313ec4e21fcefd6c2ea9a0d6c.tar.bz2
seven-wonders-d89d26144458cde313ec4e21fcefd6c2ea9a0d6c.zip
Fix unsupported remove operation in assignBoards()
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/luxons/sevenwonders/game/data/GameDefinition.java5
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);
bgstack15