public void SetUpGame(GameOfLife game, Point[] coordsList) { foreach (Point coords in coordsList) { game.ToggleCell(coords.X, coords.Y); } }
public GameOfLife LoadRandomGame(Point size, int oneInChance, bool destroySideCells) { GameOfLife game = new GameOfLife(size.X, size.Y); Random random = new Random(); for (int x = 0; x < game.SizeX; x++) { for (int y = 0; y < game.SizeY; y++) { if (random.Next(0, oneInChance) == 0) { game.ToggleCell(x, y); } } } SaveGame(game); return(game); }