createGame(null);
}
public void createGame(Snapshot snapshot) {
if (closeGame()) {
SimpleServer server = new SimpleServer(new InetSocketAddress(config.getPort()), this);
localServer.set(server);
server.createGame(snapshot);
server.start();
try {
//HACK - there is not success handler in WebSocket server
//we must wait for start to now connect to
Thread.sleep(50);
} catch (InterruptedException e) {