public static Grid TwoRings(Size size) { Grid g = Grid.OneRing(size); for (int x = 2; x < g.Width - 2; x++) { g.Walls[2 * x + 1, 4] = true; g.Walls[2 * x + 1, g.Height * 2 - 4] = true; } for (int y = 2; y < g.Height - 2; y++) { g.Walls[4, 2 * y + 1] = true; g.Walls[g.Width * 2 - 4, 2 * y + 1] = true; } return(g); }
private void buttonOneRing_Click(object sender, EventArgs e) { grid = Grid.OneRing(GridSize); CreatingNewGrid(); }