private void rbSquare_CheckedChanged(object sender, EventArgs e) { if (rbSquare.Checked) { _mode = MazeStyle.Square; GridSize = 50; ToggleDrawPathButton(); } ToggleEnableMaskButton(); ResetMaze(sender, e); }
public static MazeFactory Instance (MazeStyle mazeStyle) { if (_instance == null) { switch (mazeStyle) { case MazeStyle.MazeFactory: _instance = new MazeFactory(); break; case MazeStyle.BombedMazeFactory: _instance = new BombedMazeFactory(); break; case MazeStyle.EnchantedMazeFactory: _instance = new EnchantedMazeFactory(); break; } } return _instance; }
private void rbSquare_CheckedChanged(object sender, EventArgs e) { if (rbSquare.Checked) { _mode = MazeStyle.Square; GridSize = 50; ToggleDrawPathButton(); } else if (rbPolar.Checked) { _mode = MazeStyle.Polar; ClearMask(); GridSize = 25; } else if (rbHex.Checked) { _mode = MazeStyle.Hex; GridSize = 50; ClearMask(); } else if (rbTriangle.Checked) { _mode = MazeStyle.Triangle; GridSize = 50; ClearMask(); } else if (rbUpsilon.Checked) { _mode = MazeStyle.Upsilon; GridSize = 50; ClearMask(); } else if (rbWeave.Checked) { _mode = MazeStyle.Weave; GridSize = 50; ClearMask(); } ToggleEnableMaskButton(); ResetMaze(sender, e); }