//Thiết lập lại toàn bộ dữ liệu bàn cờ public void ResetAllBoard() { OWin = new cls5OWin(); grdBanCo.Children.Clear(); ResetBoard(); end = Player.None; this.DrawGomokuBoard(); }
//Contructors public ChessBoard(MainWindow frm, Grid grd) { Option = new Setting(); OWin = new cls5OWin(); row = column = 12; currPlayer = Player.None; end = Player.None; frmParent = frm; grdBanCo = grd; board = new Player[row, column]; ResetBoard(); eBoard = new LuongGiaBanCo(this); grdBanCo.MouseDown += new System.Windows.Input.MouseButtonEventHandler(grdBanCo_MouseDown); worker.DoWork += doi; worker.RunWorkerCompleted += AI_play; }