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)); }
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); }
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)); }