Exemple #1
0
        public IgsFriendManager(IGSClient client)
        {
            this.client = client;
            client.AddHandler(IGSMessages.Friend, OnFriendReceived);

            friendStates = new List <FriendState>();
        }
Exemple #2
0
        public IGSObserver(IGSClient client, IgsServerInfo serverInfo) : base(client, serverInfo)
        {
            Client.AddHandler(IGSMessages.Info, ReadInfo);
            Client.AddHandler(IGSMessages.Undo, ReadUndo);
            Client.AddHandler(IGSMessages.Kibitz, ReadKibitz);

            ExpectedGames = new List <int>();
        }
Exemple #3
0
        public IGSTellManager(IGSClient client)
        {
            if (client == null)
            {
                throw new ArgumentException("Argument cannot be null");
            }

            this.client = client;
            client.AddHandler(IGSMessages.Chat, GetMessage);
        }
Exemple #4
0
        public IGSFileManager(IGSClient client)
        {
            if (client == null)
            {
                throw new Exception("Argument cannot be null");
            }
            client.AddHandler(IGSMessages.File, ReadFile);

            this.client   = client;
            expectedFiles = new List <string>();
        }
Exemple #5
0
 public IGSPlayer(IGSClient client, IgsServerInfo serverInfo) : base(client, serverInfo)
 {
     client.AddHandler(IGSMessages.SaySource, ReadSaySource);
     client.AddHandler(IGSMessages.Say, ReadSay);
     client.AddHandler(IGSMessages.Info, ReadInfo);
     client.AddHandler(IGSMessages.Adjourn, ReadAdjourn);
     client.AddHandler(IGSMessages.Score, ReadScore);
     client.AddHandler(IGSMessages.StoredGames, ReadStoredGames);
     client.AddHandler(IGSMessages.Undo, ReadUndo);
     client.AddHandler(IGSMessages.StoneRemoval, ReadStoneRemoval);
     client.AddHandler(IGSMessages.SeekInfo, ReadSeekInfo);
 }
Exemple #6
0
        public IgsServerInfo(IGSClient client)
        {
            if (client == null)
            {
                throw new Exception("Argument cannot be null");
            }

            this.client = client;

            client.AddHandler(IGSMessages.GamesList, ReadGamesList);
            client.AddHandler(IGSMessages.PlayersList, ReadPlayersList);
            client.AddHandler(IGSMessages.Info, ReadInfo);

            gameInfoRequests = new List <IGSGameInfoRequest>();
        }
        public IGSGameListener(IGSClient client, IgsServerInfo serverInfo)
        {
            if ((client == null) ||
                (serverInfo == null))
            {
                throw new ArgumentException("Arguments cannot be null");
            }

            Client     = client;
            ServerInfo = serverInfo;
            client.AddHandler(IGSMessages.GameMove, ReadMoves);
            client.AddHandler(IGSMessages.GameStatus, ReadStatus);
            client.Disconnected += OnDisconnect;

            Games = new List <ObservedGame>();
        }