示例#1
0
        static void Main(string[] args)
        {
            Batiment[] ruePr  = new Batiment[3];
            Batiment[] rueSec = new Batiment[2];

            Batiment maison = new Batiment();

            maison.Initialiser("Maison de Hank Jones", 6, 20000, 60, 70, TypeBatiment.Residance);
            ruePr[0] = maison;

            Batiment buanderie = new Batiment();

            buanderie.Initialiser("Buanderie Tremblay", 2, 16000, 30, 40, TypeBatiment.Commercial);
            ruePr[1] = buanderie;

            Batiment musee = new Batiment();

            musee.Initialiser("Musée Marvel", 12, 32000, 180, 120, TypeBatiment.Musee);
            ruePr[2] = musee;

            Batiment corp = new Batiment();

            corp.Initialiser("101 Corp", 24, 36000, 50, 60, TypeBatiment.Musee);
            rueSec[0] = corp;

            Batiment lavoto = new Batiment();

            lavoto.Initialiser("LAV-O-2000", 3, 18000, 40, 50, TypeBatiment.Commercial);
            rueSec[1] = lavoto;

            AfficherRue1(ruePr);
            AfficherRue2(rueSec);
            Console.ReadKey();
        }
示例#2
0
        static void Main(string[] args)
        {
            Batiment batiment1 = new Batiment();

            batiment1.Initialiser("Maison de Hank Jones", 4, 50000, 12, 2, Batiment.TypeBatiment.RESIDENTIEL);
            Batiment batiment2 = new Batiment();

            batiment2.Initialiser("Buanderie Tremblay", 10, 100000, 300, 20, Batiment.TypeBatiment.COMMERCIALE);
            Batiment batiment3 = new Batiment();

            batiment3.Initialiser("Musee Marvel", 20, 250000, 62, 10, Batiment.TypeBatiment.RESIDENTIEL);
            Batiment batiment4 = new Batiment();

            batiment4.Initialiser("101 Corp", 4, 50000, 62, 2, Batiment.TypeBatiment.INDUSTRIEL);
            Batiment batiment5 = new Batiment();

            batiment5.Initialiser("Maison de Hank Jones", 4, 50000, 12, 2, Batiment.TypeBatiment.INDUSTRIEL);

            Batiment[] rue1 = { batiment1, batiment2, batiment3 };
            Batiment[] rue2 = { batiment4, batiment5 };

            AfficherRue1(rue1);

            AfficherRue2(rue2);
        }