// initializes the board and players. public void InitGame() { m_BlackPlayer = new Player(Color.Black); m_WhitePlayer = new Player(Color.White); m_CurrentPlayer = m_BlackPlayer; m_BlackGamesScore = m_WhiteGamesScore = 0; FormGameSettings formSettings = new FormGameSettings(); formSettings.ShowDialog(); if (formSettings.DialogResult == DialogResult.OK) { if (formSettings.IsAgainstComputer) { m_WhitePlayer.IsComputer = true; } m_CurrentGame = new GameEngine(formSettings.BoardSize); m_GameUI = new GameForm(formSettings.BoardSize, this); m_CurrentGame.InitNewGame(); startGame(); } }