Exemple #1
0
        /// <summary>
        ///     Creates a new toll cost for the given location that is inputted. If the player has enough monies and says YES the
        ///     location will be inserted into the trail, otherwise all the data will be destroyed and prompt returned to the fork
        ///     in the road where the toll probably came from.
        /// </summary>
        /// <param name="tollRoad">Location that is going to cost the player money in order to use the path to travel to it.</param>
        public void GenerateToll(TollRoad tollRoad)
        {
            if (Toll != null)
                return;

            Toll = new TollGenerator(tollRoad);
        }
Exemple #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="T:OregonTrailDotNet.Window.Travel.Toll.TollGenerator" /> class.
 /// </summary>
 /// <param name="tollRoad">Location that is going to cost the player money in order to use the path to travel to it.</param>
 public TollGenerator(TollRoad tollRoad)
 {
     Cost = GameSimulationApp.Instance.Random.Next(1, 13);
     Road = tollRoad;
 }