public override void Initialize() { ISettings settings = (ISettings) Game.Services.GetService(typeof(ISettings)); World = new World(settings.Rows, settings.Columns); Tick = settings.Tick; Running = settings.RunAtStart; base.Initialize(); }
public void SetUp() { _world = new World(); }
private List<Tuple<int, int>> GetAllLiveCellsFrom(World world) { return GetAllLiveCellsFrom(world, 0, world.RowCount, 0, world.ColumnCount); }
private List<Tuple<int, int>> GetAllLiveCellsFrom(World world, int firstRow, int rowCount, int firstColumn, int columnCount) { return (from i in Enumerable.Range(firstRow, rowCount) from j in Enumerable.Range(firstColumn, columnCount) where world.IsAlive(i, j) select Tuple.Create(i, j)).ToList(); }
public void SetUp() { wasteland = new World(ROWS, COLUMNS); gliderWorld = new World(ROWS, COLUMNS); gliderWorld.AddGlider(1, 1); }