Esempio n. 1
0
        private void Moving(Point point)
        {
            PictureBox a = FirstSelect.Pop();

            a.Location = point;
            SecondSelect.Push(a);
            move++;
            label5.Text       = string.Format("Số bước đi : {0}", move);
            FirstSelect       = SecondSelect = null;
            ABoxPic.BackColor = BBoxPic.BackColor = CBoxPic.BackColor = System.Drawing.Color.Gray;

            if (RodC.Count == Level.Value && Level.Value != 9)
            {
                GiveUpButton.PerformClick();
                MessageBox.Show("Bạn đã qua màn này. Mời bạn chơi level tiếp theo  ", "CHÚC MỪNG!!!", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                Level.Value = Level.Value + 1;
                PlayButton.PerformClick();
            }
            else if (RodC.Count == Level.Value && Level.Value == 9)
            {
                GiveUpButton.PerformClick();
                MessageBox.Show("Bạn đã vượt qua 9 màn, trò chơi kết thúc  ", "CHÚC MỪNG!!!", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }            //if(Level.Value<8,)
                         //throw new NotImplementedException();
        }