public void AddFacility(object facility) { switch (facility) { case ChickenHouse C: ChickenHouses.Add(C); break; case DuckHouse D: DuckHouses.Add(D); break; case PlowedField P: PlowedFields.Add(P); break; case GrazingField G: GrazingFields.Add(G); break; case NaturalField N: NaturalFields.Add(N); break; } }
public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); Console.WriteLine("Grazing Field has been added"); Console.WriteLine("Press enter key to continue"); Console.ReadLine(); }
//Adds Grazing field when purchasing new facility. public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); Console.WriteLine("Grazing Field Added"); Console.WriteLine("Press enter to return to Main Menu"); Console.ReadLine(); }
public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); // Added the Console.WriteLine and added a 2 second delay before showing the main menu. Console.WriteLine("A new grazing field has been created."); Thread.Sleep(2000); }
public void AddGrazingField(GrazingField field) { try { GrazingFields.Add(field); //Ticket #19 Console.WriteLine("A new grazing field has been created!"); Console.WriteLine("Press enter to continue."); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine("Could not add a grazing field."); Console.WriteLine("Press enter to continue."); Console.ReadLine(); } }
public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); }
/* * This method must specify the correct product interface of the * resource being purchased. */ //will be used in the future to add generic resources // public void PurchaseResource<T>(IResource resource, int index) // { // Console.WriteLine(typeof(T).ToString()); // switch (typeof(T).ToString()) // { // case "Cow": // GrazingFields[index].AddResource((IGrazing)resource); // break; // default: // break; // } // } public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); Console.WriteLine($"New field has been created!"); Console.ReadLine(); }
public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); Console.WriteLine("Grazing Field Succesfully Created"); Thread.Sleep(1500); }
public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); AvailableGrazingFields.Add(field); }
public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); Console.WriteLine("You have added a grazing field!"); }
public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); // Confirmation System.Console.WriteLine($"{field} has been added"); }
public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); Console.WriteLine("Grazing Field created successfully!"); Console.WriteLine(GrazingFields[GrazingFields.Count - 1]); }
public void AddGrazingField(GrazingField grazingField) { GrazingFields.Add(grazingField); }
/* * This method must specify the correct product interface of the * resource being purchased. */ // public void PurchaseResource<T> (IResource resource, int index) // { // Console.WriteLine(typeof(T).ToString()); // switch (typeof(T).ToString()) // { // case "Cow": // GrazingFields[index].AddResource((IGrazing)resource); // break; // default: // break; // } // } public void AddGrazingField(GrazingField field) { GrazingFields.Add(field); Console.WriteLine("You have added a Grazing Field!"); Thread.Sleep(1000); }