public override void Process(ICommunicationServer cs, int id) { cs.MarkClientAsGameMaster(id); var result = cs.RegisterNewGame(NewGameInfo, id); if (result) { cs.Send(new ConfirmGameRegistrationMessage(id), id); Console.WriteLine($"Added new game #{id}: {NewGameInfo.GameName}"); } else { cs.Send(new RejectGameRegistrationMessage(NewGameInfo.GameName), id); } }
public override void Process(ICommunicationServer cs, int id) { cs.Send(this, PlayerId); }
public override void Process(ICommunicationServer cs, int id) { cs.UpdateTeamCount(id, PlayerDefinition.Team); cs.AssignGameIdToPlayerId(id, PlayerId); cs.Send(this, PlayerId); }
public override void Process(ICommunicationServer cs, int id) { cs.Send(new RegisteredGamesMessage(cs.GetAllJoinableGames()), id); }