From d89d26144458cde313ec4e21fcefd6c2ea9a0d6c Mon Sep 17 00:00:00 2001 From: jbion Date: Thu, 22 Dec 2016 01:46:40 +0100 Subject: Fix unsupported remove operation in assignBoards() --- src/main/java/org/luxons/sevenwonders/game/data/GameDefinition.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/org') 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 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); -- cgit