private void InitializeOtheloGameFormUI() { if (m_OtheloStartForm.DialogResult == DialogResult.OK) { m_OtheloGameForm = new OtheloGameFormUI((byte)m_OtheloStartForm.BoardSize, m_OtheloStartForm.IsAgainstCoumputer); Application.Run(m_OtheloGameForm); } }
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(); }