using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class ScoreSystem { private int Score = 0; private int previousTask; //Message which is displaying what the tractor is currently doing. public String MessageAndScore(int Status, int Stage) { previousTask = Status; if (previousTask == 3 && Stage != 1) { Score++; } //When the Tractor is going back to the farm. if (Stage == 0) { if (Status == 1) { return "Returning with nothing after going out for a stroll"; } else if (Status == 2) { return "Returning with nothing after planting seeds"; } else if (Status == 3) { return "Returning with nothing after adding fertilizer"; } else if (Status == 4) { return "Returning with Crops"; } else { return "Error"; } } //When the Tractor is going back to work. else { if (Status == 1) { return "Going for a stroll"; } else if (Status == 2) { return "Planting seeds"; } else if (Status == 3) { return "Adding fertilizer"; } else if (Status == 4) { return "Going for Crops"; } else { return "Error"; } } } public int getScore() { return Score; } }