private Card.Choice choose(string selected, Card.Option option) { currentCard.encounters++; Card.Choice choice = new Card.Choice(); choice.card = currentCard; choice.description = Text.Sanitize(option.resolve()); choice.option = option; choice.selected = selected; history.Add(choice); avoidDuplicates(); // advance to the next card lastChoice = choice; if (deck.Count == 0) { updateCurrentCard(null); } else { Card card = deck [0]; deck.RemoveAt(0); updateCurrentCard(card); } return(choice); }
void ChooseNo() { String text = ""; if (state.deckEmpty()) { text = "You can leave all your worries behind now."; Application.Quit(); } else { result = state.no(); text = result.description; } UpdateOptionText(text); }
void ChooseYes() { String text = ""; if (state.deckEmpty()) { text = "Maybe this time things will go differently."; SetupNewGame(); } else { result = state.yes(); text = result.description; } UpdateOptionText(text); }