Exemplo n.º 1
0
        public void NewGame()
        {
            TwoIntegerVariable Inputs = new TwoIntegerVariable();

            Inputs.GetInputs();

            if (Inputs.X < 0 || Inputs.Y < 0 || Inputs.X == 0 || Inputs.Y == 0)
            {
                Menu.Text.PrintLine("Incorrect values");
            }
            else
            {
                Field         Field     = new Field(Inputs);
                CellPopulator Populator = new CellPopulator(Field);
                Populator.RandomPopulation();
                //If field size is atleast 5x5
                //Populator.CreateBlinker();
                var FieldUpdates = new List <FieldUpdate>();

                FieldUpdates.Add(new FieldUpdate(Field));
                StartGameIteration(FieldUpdates);
            }
        }
Exemplo n.º 2
0
 public Field(TwoIntegerVariable size)
 {
     Size  = size;
     Cells = new Cell[Size.X, Size.Y];
 }