示例#1
0
        public void DrawHouse(TeamLeader teamLeader)
        {
            if (teamLeader.report.Count == 11)
            {
                string home = @"
                     
                                 ( )
                               (     )
                                 (  )
                                )  )
                                 (__)                                     /\    
                                 [  ]                                    /  \  /\
                             ____[__]___________________________      /\/    \/  \
                            /                /\                 \    /   /\/\  /\ \
                           /                /  \                 \  /\/\/    \/  \
                          /                /____\                 \/               (())
                         /                 |    |                  \             (())(())
                        /__________________|_[]_|___________________\            (((\/)))
                        |  ______  ______          ______  ______   |             (\  /)
                        |  | || |  | || |  ______  | || |  | || |   |---   -------  [] 
                        |  | || |  | || |  | || |  | || |  | || |   | --------------[]  --------
                        |  |_||_|  |_||_|  | || |  |_||_|  |_||_|   |    ----     ---------
                        |                  | || |                   | 
                        |__________________|_||_|___________________| 
                        |___________________________________________| 
                     ******************************************************************************";

                Console.WriteLine(home);
            }
            else
            {
                Console.WriteLine("Дом не достроен!");
            }
        }
示例#2
0
 public Team()
 {
     TeamLeader = new TeamLeader("Федор Михайлович");
     Workers    = new List <Worker>
     {
         new Worker("Арман"),
         new Worker("Иван"),
         new Worker("Байкелди"),
         new Worker("Замир")
     };
 }
        public void Сonstruction(House house, TeamLeader teamLeader)
        {
            if (house.Basement == null)
            {
                Basement basement = new Basement();
                basement.ConstructionSite(house);
                teamLeader.report.Add($"Строитель {Name} залил фундамент!");
            }
            else if (house.Walls == null || house.Walls.Count < 4)
            {
                if (house.Walls == null)
                {
                    house.Walls = new List <Walls>();
                }
                Walls wall = new Walls();
                wall.ConstructionSite(house);
                teamLeader.report.Add($"Строитель {Name} построил {house.Walls.Count} стену !");
            }
            else if (house.Door == null)
            {
                Door door = new Door();
                door.ConstructionSite(house);
                teamLeader.report.Add($"Строитель {Name} смонтировал дверь!");
            }

            else if (house.Windows == null || house.Windows.Count < 4)
            {
                if (house.Windows == null)
                {
                    house.Windows = new List <Window>();
                }
                Window window = new Window();
                window.ConstructionSite(house);
                teamLeader.report.Add($"Строитель {Name} поставил {house.Windows.Count} окно!");
            }

            else if (house.Roof == null)
            {
                Roof roof = new Roof();
                roof.ConstructionSite(house);
                teamLeader.report.Add($"Строитель {Name} накрыл крышу!");
            }
        }