예제 #1
0
        internal async Task <PlayerDescriptor> SelectOption(string optionCode)
        {
            Endpoint             e       = Endpoint.ChooseOption(CurrentMatchID, Player.Secret);
            ConnectorPayloadBase payload = new OptionPayload(Player.Name, optionCode);

            return(await _gameServer.PostJSON <PlayerDescriptor>(e, payload));
        }
예제 #2
0
        internal async Task <PlayerDescriptor> QuitMatch(MatchDescriptor match)
        {
            Endpoint             e        = Endpoint.QuitMatch(match.MatchId, Player.Secret);
            ConnectorPayloadBase payload  = new OptionPayload(Player.Name);
            PlayerDescriptor     response = await _gameServer.PostJSON <PlayerDescriptor>(e, payload);

            return(response);
        }
예제 #3
0
        internal async Task <MatchDescriptor> JoinMatch(MatchDescriptor selectedMatch)
        {
            Endpoint             e       = Endpoint.JoinMatch(selectedMatch.MatchId);
            ConnectorPayloadBase payload = new OptionPayload(Player.Name);

            CurrentMatchID = selectedMatch.MatchId;
            return(await _gameServer.PostJSON <MatchDescriptor>(e, payload));
        }