Ejemplo n.º 1
0
        public frmMain()
        {
            InitializeComponent();

            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    fields[i, j] = new pointData();
                }
            }
        }
Ejemplo n.º 2
0
        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();
        }