Example #1
0
        /*Dat ban co ve trang thai ban dau*/
        public static void SetToDefault(Label lblPheDuocDanh, Label lblSoLuotDi, Button btnNewGame, Button btnUndo)
        {
            QuanCoBiLoai   = null;
            QuanCoDuocChon = null;
            PheDuocDanh    = MauPheTa;
            SoLuotDi       = 0;

            WritePheDuocDanh(lblPheDuocDanh);
            lblSoLuotDi.Text   = SoLuotDi.ToString();
            btnNewGame.Enabled = false;
            btnUndo.Enabled    = false;
        }
Example #2
0
        /* Đổi phe cho sự kiện undo */
        public static void DoiPhe(Label lblPheDuocDanh, Label lblSoLuotDi, Button btnNewGame)
        {
            QuanCoBiLoai   = null;
            QuanCoDuocChon = null;
            PheDuocDanh    = PheDoiPhuong();
            SoLuotDi--;

            WritePheDuocDanh(lblPheDuocDanh);
            lblSoLuotDi.Text = SoLuotDi.ToString();
            if (SoLuotDi != 0)
            {
                btnNewGame.Enabled = true;
            }
            else
            {
                btnNewGame.Enabled = false;
            }
            RefreshBanCo();
        }