Exemplo n.º 1
0
 public Game4(GameProperty gameproperty, Grass2Property grass2property, Herbivorous1Property herbivorous1property)
 {
     Type                 = 4;
     gameProperty         = gameproperty;
     grass2Property       = grass2property;
     herbivorous1Property = herbivorous1property;
 }
Exemplo n.º 2
0
        public override Cell[,] NextGeneration(Cell[,] gameField, Cell[,] gameFieldNext)
        {
            Grass2Property grass2Property2 = new Grass2Property(((Grass2)gameField[CoordX, CoordY].Living).grass2Property.Course, ((Grass2)gameField[CoordX, CoordY].Living).grass2Property.Frequency);

            grass2Property2.Course++;
            gameFieldNext[CoordX, CoordY] = new Cell(new Grass2(CoordX, CoordY, SizeX, SizeY, grass2Property2), livingName, CoordX, CoordY);
            if (grass2Property2.Course % grass2Property2.Frequency + 1 == grass2Property2.Frequency)
            {
                Grass2Property grass2Property3 = new Grass2Property(0, ((Grass2)gameField[CoordX, CoordY].Living).grass2Property.Frequency);
                gameFieldNext = ElementAdd(gameField, gameFieldNext);
            }
            return(gameFieldNext);
        }
Exemplo n.º 3
0
 public Grass2(int coordX, int coordY, int sizeX, int sizeY, Grass2Property grass2property) : base(coordX, coordY, sizeX, sizeY)
 {
     livingName     = LivingName.Grass2;
     grass2Property = grass2property;
 }
Exemplo n.º 4
0
 public Herbivorous1(int coordX, int coordY, int sizeX, int sizeY, Herbivorous1Property herbivorous1property, Grass2Property grass2property) : base(coordX, coordY, sizeX, sizeY)
 {
     livingName           = LivingName.Herbivorous1;
     herbivorous1Property = herbivorous1property;
     grass2Property       = grass2property;
 }