コード例 #1
0
ファイル: Game.cs プロジェクト: nytokyr/Kata-Trivia
        public void Roll(int roll)
        {
            Console.WriteLine("{0} is the current player", _CurrentPlayer.Name);
            Console.WriteLine("They have rolled a {0}", roll);

            if (_CurrentPlayer.IsInPenalityBox)
            {
                if (roll % 2 != 0)
                {
                    _IsGettingOutOfPenaltyBox = true;
                    Console.WriteLine("{0} is getting out of the penalty box", _CurrentPlayer.Name);
                }
                else
                {
                    Console.WriteLine("{0} is not getting out of the penalty box", _CurrentPlayer.Name);
                    _IsGettingOutOfPenaltyBox = false;
                    return;
                }
            }

            this.PlayerMoves(roll);
            Question question = _QuestionManager.AskQuestion(_CurrentPlayer.Position);

            this.DisplayQuestion(question);
        }