public override string ToString() { StringBuilder report = new StringBuilder(); ChickenHouses.ForEach(gf => report.Append(gf)); DuckHouses.ForEach(gf => report.Append(gf)); GrazingFields.ForEach(gf => report.Append(gf)); NaturalFields.ForEach(gf => report.Append(gf)); PlowedFields.ForEach(gf => report.Append(gf)); return(report.ToString()); }
public override string ToString() { StringBuilder report = new StringBuilder(); GrazingFields.ForEach(f => report.Append(f)); ChickenHouses.ForEach(f => report.Append(f)); DuckHouses.ForEach(f => report.Append(f)); PlowedFields.ForEach(f => report.Append(f)); NaturalFields.ForEach(f => report.Append(f)); report.Append($"Total Seeds in storage is {processedSeeds}.\n"); report.Append($"Total Compost in storage is {processedCompost}.\n"); return(report.ToString()); }
public override string ToString() { //Creates a new string StringBuilder report = new StringBuilder(); //Goes through every Facility in the part and calls its ToString() function, adding it to the report string GrazingFields.ForEach(gf => report.Append(gf)); PlowedFields.ForEach(gf => report.Append(gf)); NaturalFields.ForEach(gf => report.Append(gf)); ChickenHouses.ForEach(gf => report.Append(gf)); DuckHouses.ForEach(gf => report.Append(gf)); //Returns the report string return(report.ToString()); }
public override string ToString() { StringBuilder report = new StringBuilder(); GrazingFields.ForEach(gf => report.Append(gf)); PlowedFields.ForEach(pf => report.Append(pf)); ChickenHouses.ForEach(ch => report.Append(ch)); NaturalFields.ForEach(nf => report.Append(nf)); DuckHouses.ForEach(dh => report.Append(dh)); Wildflowers.ForEach(wf => report.Append(wf)); return(report.ToString()); }
public override string ToString() { StringBuilder report = new StringBuilder(); GrazingFields.ForEach(gf => report.Append(gf)); PlowedFields.ForEach(pf => report.Append(pf)); NaturalFields.ForEach(nf => report.Append(nf)); DuckHouses.ForEach(dh => report.Append(dh)); ChickenHouses.ForEach(ch => report.Append(ch)); report.Append("\n"); report.Append(SeedHarvester); report.Append(MeatProcessor); report.Append(FeatherGatherer); report.Append(EggGatherer); report.Append(Composter); return(report.ToString()); }
public override string ToString() { double TotalMeat = 0; foreach (GrazingField gf in GrazingFields) { TotalMeat += gf.Meat; } StringBuilder report = new StringBuilder(); GrazingFields.ForEach(gf => report.Append(gf)); ChickenHouses.ForEach(ch => report.Append(ch)); DuckHouses.ForEach(dh => report.Append(dh)); NaturalFields.ForEach(dh => report.Append(dh)); PlowedFields.ForEach(dh => report.Append(dh)); report.Append($"Total Meat Produced: {TotalMeat}kg"); return(report.ToString()); }