Exemplo n.º 1
0
        private static void GetPlayerCards(ClientInfo client, JObject jsonObject)
        {
            var gameIdToken = jsonObject["gameId"];
            var userId      = jsonObject["userId"];

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

            var gameId          = (int)gameIdToken;
            var playerSeatIndex = (int)userId;

            var response = sl.GetPlayerCards((int)gameIdToken, (int)userId);

            SendMessage(client, response);
        }