예제 #1
0
 public void AchatAmélioration(ref Usine Stand, Banque portefeuille)
 {
     if (Stand.coutAmelio <= portefeuille.Argent)
     {
         portefeuille.EnleverArgent(Stand.coutAmelio);
         Stand.Amélioration();
     }
 }
예제 #2
0
        public Usine creation(int numUsine)
        {
            Usine usine = new Usine();

            switch (numUsine)
            {
            case 1: usine = new Detecteurdepoussiere(); break;

            case 2: usine = new BalaiVibranium(); break;

            case 3: usine = new CPUAmeliorer(); break;

            case 4: usine = new AspirateurQuantique(); break;
            }
            return(usine);
        }