CreateGamePhase phase = (CreateGamePhase)game.getPhase();
phase.startGame();
return;
}
CreateGamePhase phase;
Snapshot snapshot = null;
if (msg.getSnapshot() != null) {
try {
snapshot = new Snapshot(msg.getSnapshot());
} catch (IOException e) {
logger.error(e.getMessage(), e);
return;
}
}
if (snapshot == null) {
game = new Game(msg.getGameId());
phase = new CreateGamePhase(game, conn);
} else {
game = snapshot.asGame(msg.getGameId());
phase = new LoadGamePhase(game, snapshot, conn);
}
game.setConfig(client.getConfig());
final PlayerSlot[] slots = new PlayerSlot[PlayerSlot.COUNT];