Ejemplo n.º 1
0
 //Contructors
 public BanCo(MainWindow frm, Grid grd)
 {
     Option = new Option();
     OWin = new _5O_Win();
     row = column = 12;
     currPlayer = Player.None;
     end = Player.None;
     frmParent = frm;
     grdBanCo = grd;
     board = new Player[row, column];
     ResetBoard();
     eBoard = new LuongGiaBanCo(this);
     hv = new HinhVuong();
     CreateHV();
     grdBanCo.Children.Add(hv);
     grdBanCo.MouseDown += new System.Windows.Input.MouseButtonEventHandler(grdBanCo_MouseDown);
 }
Ejemplo n.º 2
0
 //Hàm lấy thông tin 5 ô Win hoặc Lose
 private void OnWinOrLose()
 {
     Node node = new Node();
     for (int i = 0; i < 5; i++)
     {
         node = OWin.GiaTri[i];
         HinhVuong hv = new HinhVuong();
         hv.Height = 40;
         hv.Width = 40;
         hv.Opacity = 100;
         hv.HorizontalAlignment = 0;
         hv.VerticalAlignment = 0;
         hv.Margin = new Thickness(node.Column * length - 2, node.Row * length - 3, 0, 0);
         grdBanCo.Children.Add(hv);
     }
 }