}
public void createGame(Snapshot snapshot) {
if (snapshot == null) {
game = new GameSettings(getRandomId());
game.getExpansions().add(Expansion.BASIC);
for (CustomRule cr : CustomRule.defaultEnabled()) {
game.getCustomRules().add(cr);
}
for (int i = 0; i < slots.length; i++) {
slots[i] = new ServerPlayerSlot(i);
}
} else {
this.snapshot = snapshot;
game = new GameSettings(getRandomId());
game.getExpansions().addAll(snapshot.getExpansions());
game.getCustomRules().addAll(snapshot.getCustomRules());
loadSlotsFromSnapshot();
}
}