// ************ CONSTRUCTOR ****************************** public EValueBoard(GomokuBoard GBoard) { Width = GBoard.Width; Height = GBoard.Height; Board = new int[Height + 2, Width + 2]; ResetBoard(); }
// Copy mot ban co khac. public void CopyTo(ref GomokuBoard Br) { int rw, cl; Br.Parent = this.Parent; Br.ResetBoard(); Br.EBoard = new EValueBoard(Br); for (rw = 0; rw < Height + 2; rw++) for (cl = 0; cl < Height + 2; cl++) Br.Board[rw, cl] = Board[rw, cl]; }
// ************ HANDLE EVENT *************************** private void frmMain_Load(object sender, EventArgs e) { view = new GomokuBoard(this); NewGame(); statusbar.Hide(); vScroll.Width =20; hScroll.Height =20; vScroll.Maximum = vScroll.Minimum = vScroll.Value = 1; hScroll.Maximum = hScroll.Minimum = hScroll.Value = 1; }