2020 - Display how many days have passed
The Issue
The simulation doesn't record the number of days passed.
The Solution
Create a variable in the simulation class called 'days'. Increment 'days' every time the simulation processes a day. Final display the value on the main menu.
Example
find the simulation class, look for this:
class Simulation
{
private static Random rnd = new Random();
protected Settlement simulationSettlement;
protected int noOfCompanies;
protected double fuelCostPerUnit, baseCostForDelivery;
protected List<Company> companies = new List<Company>();
Now add a new variable:
public int days=0;
Now find the 'ProcessDayEnd' method in the simulation class. In the method you will see the final two lines of code is:
DisplayCompaniesAtDayEnd();
DisplayEventsAtDayEnd();
Before these two lines add:
days++;
Console.WriteLine("Days Passed: " + days);