예제 #1
0
        public bool isGameOver(int gameId)
        {
            object game = sl.GetGameState(gameId);

            if (game != null && !((TexasHoldemGame)game).active)
            {
                return(true);
            }
            return(false);
        }
예제 #2
0
        private static void GetGameState(ClientInfo client, JObject jsonObject)
        {
            var gameIdToken = jsonObject["gameId"];

            if ((gameIdToken == null) || (gameIdToken.Type != JTokenType.Integer))
            {
                throw new ArgumentException("Error: Parameters Mismatch at Get Game State.");
            }

            var response = sl.GetGameState((int)gameIdToken);

            SendMessage(client, response);
        }