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); } }
public Field(TwoIntegerVariable size) { Size = size; Cells = new Cell[Size.X, Size.Y]; }