Пример #1
0
 public void RollAndUpdatePosition()
 {
     if (!Imprisoned)
     {
         var roll = new DiceRoll(_random).Roll();
         Rolls.Add(roll);
         if (LastThreeRollsWereDoubles())
         {
             Imprison();
         }
         else
         {
             MoveForward(roll.TotalValue());
         }
     }
     else if (Imprisoned)
     {
         RollInPrison();
         if (ShouldBeReleasedFromPrison())
         {
             ReleaseFromPrison();
         }
     }
 }
Пример #2
0
        public void RollInPrison()
        {
            var roll = new DiceRoll(_random).Roll();

            RollsInPrison.Add(roll);
        }