public frmMain() { InitializeComponent(); for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { fields[i, j] = new pointData(); } } }
private void resetToolStripMenuItem_Click(object sender, EventArgs e) { if (MessageBox.Show("Do you really want to reset the field?", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.OK) { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { fields[i, j] = new pointData(); } } } else { return; } score = 0; AppendRandomNumber(); RedrawField(); }