Exemplo n.º 1
0
        private void RollForPlayer(Player player)
        {
            const int boardSize = 40;
              int newLocation = player.Location.Index + Dice.Roll();

              if (newLocation > boardSize)
              {
            player.PassGo();
              }
              else if (newLocation == boardSize)
              {
            player.PassesGoOnNextRoll = true;
              }
              else if (player.PassesGoOnNextRoll)
              {
            player.PassesGoOnNextRoll = false;
            player.PassGo();
              }

              newLocation %= boardSize;
              player.Location = Locations.All[newLocation];

              DoRentTransaction(player);
        }