private void ResetBoard() { panel1Board.Invalidate(); ai = new GomokuAI(progressBar1, Convert.ToInt32(numUD_Board.Value)); pGraphics = panel1Board.CreateGraphics(); gEngine = new GFX(pGraphics, Convert.ToInt32(numUD_Board.Value)); board = new Board(Convert.ToInt32(numUD_Board.Value)); }
public MainForm() { InitializeComponent(); numUD_Board.Minimum = 10; numUD_Board.Maximum = 30; cbxGameMode.SelectedIndex = 0; ai = new GomokuAI(progressBar1, Convert.ToInt32(numUD_Board.Value)); playerTurn = true; player1Score = 0; player2Score = 0; prevMove = "x"; }