public Main() { InitializeComponent(); SetPictureBoxWidth(); map = new Map(rows, columns); mapPathFinder = new MapPathfinder(map); SetControlState(false); }
private void BtnReset_Click(object sender, EventArgs e) { columns = int.Parse(txtColumns.Text); rows = columns; SetPictureBoxWidth(); map = new Map(rows, columns); mapPathFinder = new MapPathfinder(map); // redraw the grid pictureBox.Invalidate(); }