示例#1
0
        public InfoGame MakeMove(string move)
        {
            if (CurrentID == -1)
            {
                return(new InfoGame()
                {
                    GameID = -1
                });
            }
            NameValueCollection list;

            list = JsonParser(CallServer("Chess", CurrentID + "/" + move));

            return(info = new InfoGame(list));
        }
示例#2
0
        public InfoGame GetGame(bool restart)
        {
            NameValueCollection list;

            if (!restart)
            {
                list = JsonParser(CallServer("Chess", ""));
            }
            else
            {
                JsonParser(CallServer("Restart", ""));
                list = JsonParser(CallServer("Chess", ""));
            }
            CurrentID = Convert.ToInt32(list["GameID"]);
            return(info = new InfoGame(list));
        }