public bool Check() { Console.WriteLine($"Привет. Меня зовут {name}. Я воркер и я проверяю."); if (house.IsReady()) { Console.WriteLine("House is ready! Work is done. Give me money!"); return(true); } else { if (house.IsBasementReady()) { if (house.IsWallsReady()) { if (house.IsWindowsReady()) { if (house.IsDoorsReady()) { if (house.IsRoofReady()) { Console.WriteLine("You will never see this text. I hope."); } else { Work(roof); } } else { Work(door); } } else { Work(windows); } } else { Work(walls); } } else { Work(basement); } return(false); } }
public bool Check() { Console.WriteLine($"Привет. Меня зовут {name}. Я бригадир и я проверяю."); if (house.IsReady()) { Console.WriteLine("House is ready! Work is done. Give me money!"); return(true); } else { if (house.IsBasementReady()) { if (house.IsWallsReady()) { if (house.IsWindowsReady()) { if (house.IsDoorsReady()) { if (house.IsRoofReady()) { Console.WriteLine("You will never see this text. I hope."); } else { Console.WriteLine("Need to build a roof.");; } } else { Console.WriteLine("Need to build a door.");; } } else { Console.WriteLine("Need to build a window.");; } } else { Console.WriteLine("Need to build a wall.");; } } else { Console.WriteLine("Need to build basement.");; } return(false); } }