Exemple #1
0
        public GameAI(GameClient game, Duel duel)
        {
            Game = game;
            Connection = game.Connection;
            Duel = duel;
            Utils = new AIFunctions(duel);

            m_dialogs = new Dialogs(game);
        }
Exemple #2
0
 private void StartDuel()
 {
     if (m_gameClients.Count <= MaxGames)
     {
         GameClient game = new GameClient(this, m_server);
         game.Start();
         AddGameClient(game);
         Logger.WriteLine("Checkmate game created.");
     }
 }
Exemple #3
0
 public void AddGameClient(GameClient client)
 {
     m_addedClients.Add(client);
 }
Exemple #4
0
 public void RemoveGameClient(GameClient client)
 {
     m_removedClients.Add(client);
 }
Exemple #5
0
 private void OnStartDuel(string data)
 {
     DuelRequest duel = JsonConvert.DeserializeObject<DuelRequest>(data);
     ServerInfo server = Client.GetServer(duel.Server);
     if (server != null)
     {
         Logger.WriteLine("Duel requested. Room informations are " + duel.DuelFormatString + ".");
         GameClient game = new GameClient(Client, server, duel.DuelFormatString);
         game.Start();
         Client.AddGameClient(game);
     }
 }