public string ProcessSettleCommand(List <string> args) { string name = args[0]; int age = int.Parse(args[1]); int productivity = int.Parse(args[2]); string villageName = args[3]; Peasant peasant = new Peasant(name, age, productivity); Village village = GetVillage(villageName); village.AddPeasant(peasant); return($"Settled Peasant {name} in Village {villageName}!"); }
public void AddPeasant(Peasant peasant) { peasants.Add(peasant); }