Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public override void Process(ICommunicationServer cs, int id)
 {
     cs.Send(this, PlayerId);
 }
Exemplo n.º 3
0
 public override void Process(ICommunicationServer cs, int id)
 {
     cs.UpdateTeamCount(id, PlayerDefinition.Team);
     cs.AssignGameIdToPlayerId(id, PlayerId);
     cs.Send(this, PlayerId);
 }
Exemplo n.º 4
0
 public override void Process(ICommunicationServer cs, int id)
 {
     cs.Send(new RegisteredGamesMessage(cs.GetAllJoinableGames()), id);
 }