예제 #1
0
        public DuelResult ApplySelection(string fromDisplayName, string message)
        {
            if (!RockPaperScissors.GetByName(message, out RockPaperScissors choice))
            {
                return(new DuelResult {
                    MessageForUser = "******"
                });
            }

            if (ChallengerChoice == null && fromDisplayName.EqualsIns(Challenger))
            {
                ChallengerChoice = choice;
            }
            else if (OpponentChoice == null && fromDisplayName.EqualsIns(Opponent))
            {
                OpponentChoice = choice;
            }

            return(ContinueIfReady());
        }