Exemplo n.º 1
0
        public EcosystemeCitadin(int maxNuisible, List <Nuisible> nuisibles, int ecosytemeLimX, int ecosytemeLimY)
        {
            Random aleatoire       = new Random();
            int    tempMaxNuisible = maxNuisible / 2;
            int    tempRat         = aleatoire.Next(0, tempMaxNuisible);
            int    tempPigeon      = aleatoire.Next(0, tempMaxNuisible);
            int    tempZombie      = 0;

            Ecosysteme.FactoryCreator(tempRat, tempPigeon, tempZombie, nuisibles);
            this.LimiteX = ecosytemeLimX;
            this.LimiteY = ecosytemeLimY;
        }
Exemplo n.º 2
0
        public EcosystemeUmbrellaCorp(int maxNuisible, List <Nuisible> nuisibles, int ecosytemeLimX, int ecosytemeLimY)
        {
            Random aleatoire       = new Random();
            int    tempMaxNuisible = maxNuisible / 4;
            int    tempRat         = aleatoire.Next(0, tempMaxNuisible);
            int    tempPigeon      = aleatoire.Next(0, tempMaxNuisible);

            int fiftyZombie = tempRat + tempPigeon;

            int tempRest   = maxNuisible - fiftyZombie - tempRat - tempPigeon;
            int alealRest  = aleatoire.Next(0, tempRest);
            int tempZombie = (tempRat + tempPigeon + alealRest);

            Ecosysteme.FactoryCreator(tempRat, tempPigeon, tempZombie, nuisibles);
            this.LimiteX = ecosytemeLimX;
            this.LimiteY = ecosytemeLimY;
        }