/// <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); }
/// <summary> /// Destroys all the associated data related to keeping track of a toll road and the cost for crossing it. If the /// player encounters another toll toad this information will be re-generated. /// </summary> public void DestroyToll() { if (Toll == null) return; Toll = null; }