private void m_DoneButton_Click(object sender, EventArgs e) { string mainPlayerName = m_FirstPlayerNameTextBox.Text; string secondPlayerName = m_SecondPlayerNameTextBox.Text; bool IsPlayer2Computer = getPlayer2Type(); int sizeBoard = getSizeBoard(); OtheloGameManager OtheloGameLogic = new OtheloGameManager((byte)sizeBoard, mainPlayerName, secondPlayerName, IsPlayer2Computer); OtheloGameFormUI OtheloGame = new OtheloGameFormUI(OtheloGameLogic); this.Hide(); this.Close(); OtheloGame.StartGame(); }
private void initializeGameManager() { if (m_IsAgainstComputer == true) { m_OtheloGame = new OtheloGameManager(r_BoardSize, "Player1", "Computer", m_IsAgainstComputer); } else { m_OtheloGame = new OtheloGameManager(r_BoardSize, "Player1", "Player2", m_IsAgainstComputer); } m_OtheloGame.InitializeGame(); }