public void setGameController(GameController game) { gameController = game; foreach (Control control in this.Controls) { if (control.GetType() == typeof(Button) && control.Name.Substring(0, 5).Equals("coord")) { game.updateNoteDictionary(control.Name.ToString(), ""); } } }
//button to save what the user input private void button1_Click(object sender, EventArgs e) { game.updateNoteDictionary(curButton, notes.Text); game.setCoord(curButton, answer.Text); this.Hide(); }