Exemple #1
0
 public BanCo(PictureBox ptb, Label txt, ProgressBar prg1)
 {
     CheDoChoi  = 1;
     NguoiChoi1 = new NguoiChoi("Hoang", Image.FromFile(Application.StartupPath + "\\Resources\\CaroX.png"), 1);
     NguoiChoi2 = new NguoiChoi("Viet", Image.FromFile(Application.StartupPath + "\\Resources\\Caro0.png"), 2);
     LuotChoi   = 1;
     ptb1       = ptb;
     txt1       = txt;
     prg        = prg1;
     dsUndo     = new Stack <Button>();
     dsoldbtn   = new Stack <Button>();
 }
Exemple #2
0
        public void NewGamePvPC()
        {
            CheDoChoi = 3;
            for (int i = 0; i < ArroCo.Count; i++)
            {
                for (int j = 0; j < ArroCo[i].Count; j++)
                {
                    // đổi background image
                    ArroCo[i][j].BackgroundImage = null;
                }

                LuotChoi = 1;
                ThongTinLuotDi();
                dsUndo     = new Stack <Button>();
                NguoiChoi1 = new NguoiChoi("Computer", Image.FromFile(Application.StartupPath + "\\Resources\\CaroX.png"), 1);
            }
            ComChess();
        }