예제 #1
0
파일: Game4.cs 프로젝트: miyu8/Task8_3
 public Game4(GameProperty gameproperty, Grass2Property grass2property, Herbivorous1Property herbivorous1property)
 {
     Type                 = 4;
     gameProperty         = gameproperty;
     grass2Property       = grass2property;
     herbivorous1Property = herbivorous1property;
 }
예제 #2
0
파일: Grass2.cs 프로젝트: miyu8/Task8_3
        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);
        }
예제 #3
0
파일: Grass2.cs 프로젝트: miyu8/Task8_3
 public Grass2(int coordX, int coordY, int sizeX, int sizeY, Grass2Property grass2property) : base(coordX, coordY, sizeX, sizeY)
 {
     livingName     = LivingName.Grass2;
     grass2Property = grass2property;
 }
예제 #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;
 }