public void OnJoinGame(JoinGamePacket packet) { if (loggedIn && (game == null || !game.active)) { if (legend.HasGame(loggedInUser)) { legend.StopGame(loggedInUser); } game = new ClientGame(this, loggedInUser, loggedInUsername, legend.config, legend); legend.AddGame(loggedInUser, game); } }
public ClientHandler(Socket handler, Legend legend) { this.handler = handler; this.game = null; this.legend = legend; }