public static Parse ( int id, List |
||
id | int | |
cards | List |
|
optionId | int | |
wrtPlayerId | int | |
return |
public void SendCardChoice(ICardChoiceVerifier verifier, List <List <Card> > answer, AdditionalCardChoiceOptions options) { for (int i = 0; i < server.MaxClients; i++) { int j = 0; if (answer != null) { foreach (var cards in answer) { foreach (Card c in cards) { if (verifier.Helper != null && (verifier.Helper.RevealCards || (verifier.Helper.AdditionalFineGrainedCardChoiceRevealPolicy != null && verifier.Helper.AdditionalFineGrainedCardChoiceRevealPolicy[j]))) { if (c.Place.DeckType != DeckType.Equipment && c.Place.DeckType != DeckType.DelayedTools) { c.RevealOnce = true; } } } j++; } } server.SendPacket(i, AskForCardChoiceResponse.Parse(proxy.QuestionId, answer, options == null? 0 : options.OptionResult, i)); } }
public void TryAskForCardChoice(Prompt prompt, List <DeckPlace> sourceDecks, List <string> resultDeckNames, List <int> resultDeckMaximums, ICardChoiceVerifier verifier, AdditionalCardChoiceOptions options, CardChoiceRearrangeCallback callback) { List <List <Card> > answer; if (!IsPlayable) { if (IsUiDetached) { return; } uiProxy.AskForCardChoice(prompt, sourceDecks, resultDeckNames, resultDeckMaximums, verifier, out answer, options, callback); return; } if (IsUiDetached || !uiProxy.AskForCardChoice(prompt, sourceDecks, resultDeckNames, resultDeckMaximums, verifier, out answer, options, callback) || answer == null) { Trace.TraceInformation("Invalid answer"); client.Send(AskForCardChoiceResponse.Parse(numQuestionsAsked, null, 0, client.SelfId)); } else { client.Send(AskForCardChoiceResponse.Parse(numQuestionsAsked, answer, options == null ? 0 : options.OptionResult, client.SelfId)); } }