public void BuildWalls() { if (workers.Count >= needWorkers) { if (house.Documentation.ActWorkPerformed.BasementFinish && !house.Documentation.ActWorkPerformed.WallsFinish) { if (house.Walls is null) { throw new Exception("Walls are NULL"); } house.Walls.DoBuild(house.Documentation.ProgressBook.Walls); house.Documentation.ProgressBook.Walls++; if (house.Documentation.ProgressBook.Walls == house.Documentation.Project.Walls) { house.Documentation.ActWorkPerformed.Walls_Finish(); } } else if (!house.Documentation.ActWorkPerformed.BasementFinish) { MyConsole.WriteInformation("Basement is not finish"); Loger.WriteLog("Basement is not finish"); } else { MyConsole.WriteInformation("Walls are already buil"); Loger.WriteLog("Walls are already buil"); } } else { MyConsole.WriteInformation("Very few workers "); Loger.WriteLog("Very few workers"); } }
public void BuildDoor() { if (workers.Count >= needWorkers) { if (house.Documentation.ActWorkPerformed.WallsFinish && !house.Documentation.ActWorkPerformed.DoorFinish) { if (house.Door is null) { throw new Exception("Door is NULL"); } house.Door.DoBuild(house.Documentation.ProgressBook.Doors); house.Documentation.ProgressBook.Doors++; if (house.Documentation.ProgressBook.Doors == house.Documentation.Project.Doors) { house.Documentation.ActWorkPerformed.Door_Finish(); } } else if (!house.Documentation.ActWorkPerformed.WallsFinish) { MyConsole.WriteInformation("Walls are not finish"); } else { MyConsole.WriteInformation("Doors are already buil"); } } else { MyConsole.WriteInformation("Very few workers "); } }
public void BuildBasement() { if (workers.Count >= needWorkers) { if (!house.Documentation.ActWorkPerformed.BasementFinish) { if (house.Basement is null) { throw new Exception("Basement is NULL"); } house.Basement.DoBuild(); house.Documentation.ProgressBook.Basement++; if (house.Documentation.ProgressBook.Basement == house.Documentation.Project.Basement) { house.Documentation.ActWorkPerformed.Besement_Finish(); } } else { MyConsole.WriteInformation("Basement is already buil"); Loger.WriteLog("Basement is already buil"); } } else { MyConsole.WriteInformation("Very few workers "); Loger.WriteLog("Very few workers"); } }
public void BuildRoof() { if (workers.Count >= needWorkers) { if (house.Documentation.ActWorkPerformed.WallsFinish && !house.Documentation.ActWorkPerformed.RoofFinish) { if (house.Roof is null) { throw new Exception("Roof is NULL"); } house.Roof.DoBuild(); house.Documentation.ProgressBook.Roof++; if (house.Documentation.ProgressBook.Roof == house.Documentation.Project.Roof) { house.Documentation.ActWorkPerformed.Roof_Finish(); } } else if (!house.Documentation.ActWorkPerformed.WallsFinish) { MyConsole.WriteInformation("Walls are not finish"); Loger.WriteLog("Walls are not finish"); } else { MyConsole.WriteInformation("Roof is already buil"); Loger.WriteLog("Roof is already buil"); } } else { MyConsole.WriteInformation("Very few workers "); Loger.WriteLog("Very few workers"); } }
public void LayOffWorkers(int num = 1) { for (int i = 0; i < num; i++) { if (workers.Count > 0) { workers.RemoveAt(0); } else { MyConsole.WriteInformation("There are no employees in the team"); } } }
public void HireWorkers(int num = 1) { for (int i = 0; i < num; i++) { if (workers.Count < needWorkers) { workers.Add(new Worker()); } else { MyConsole.WriteInformation("The team is complete "); } } }
public void DoBuild(int part) { MyConsole.WriteInformation("Windows are building now... "); Console.ForegroundColor = ConsoleColor.Gray; for (int i = 0; i < 4; i++) { Console.SetCursorPosition(8 + part * 8, 17 - i); for (int j = 0; j < 5; j++) { Console.Write(":"); Thread.Sleep(25); } Console.WriteLine(); } }
public void DoBuild(int part) { MyConsole.WriteInformation("Door are building now... "); Console.ForegroundColor = ConsoleColor.Gray; for (int i = 0; i < 6; i++) { Console.SetCursorPosition(30, 19 - i); for (int j = 0; j < 6; j++) { Console.Write(":"); Thread.Sleep(25); } Console.WriteLine(); } }
public void DoBuild(int part) { MyConsole.WriteInformation("Walls is building "); Console.ForegroundColor = ConsoleColor.DarkGreen; for (int i = 0; i < 2; i++) { Console.SetCursorPosition(5, 19 - i - part * 2); for (int j = 0; j < 40; j++) { Console.Write("%"); Thread.Sleep(25); } Console.WriteLine(); } }
public void DoBuild(int part = 1) { MyConsole.WriteInformation("Roof is building "); Console.ForegroundColor = ConsoleColor.Cyan; for (int i = 0; i < 10; i++) { Console.SetCursorPosition(3 + i, 11 - i); for (int j = 0; j < 44 - i * 2; j++) { Console.Write("*"); Thread.Sleep(25); } Console.WriteLine(); } }
public void DoBuild(int part = 1) { MyConsole.WriteInformation("Basement is building"); Console.ForegroundColor = ConsoleColor.DarkRed; for (int i = 0; i < 3; i++) { Console.SetCursorPosition(5, 22 - i); for (int j = 0; j < 40; j++) { Console.Write("#"); Thread.Sleep(25); } Console.WriteLine(); } MyConsole.WriteInformation("The basement is completed"); }
public void HireWorkers(int num = 1) { for (int i = 0; i < num; i++) { if (workers.Count < needWorkers) { Loger.WriteLog("Trying to hire a worker"); workers.Add(new Worker()); Loger.WriteLog("The worker is hired"); } else { MyConsole.WriteInformation("The team is complete "); Loger.WriteLog("The team is complete"); } } }