private void closeSettingsFormAndShowMemoryGameForm()
        {
            this.m_FormGameBoard = getFormGameBoard();

            if (this.m_FormGameBoard != null)
            {
                this.Dispose();
                s_IsFormGameBoardShowed = true;
                this.m_FormGameBoard.ShowDialog();
            }
        }
        private FormGameBoard getFormGameBoard()
        {
            FormGameBoard formGameBoard = null;

            if (checkIfEnteredNamesAreValid(textBoxFirstPlayerName.Text, textBoxSecondPlayerName.Text))
            {
                Player playerOne = new Player(textBoxFirstPlayerName.Text, true, Color.FromArgb(0, 192, 0));
                Player playerTwo;

                if (textBoxSecondPlayerName.Enabled)
                {
                    playerTwo = new Player(textBoxSecondPlayerName.Text, true, Color.FromArgb(148, 0, 211));
                }
                else
                {
                    playerTwo = new Player("Computer", false, Color.FromArgb(148, 0, 211));
                }

                this.m_GameLogicComponent = new GameLogicComponent(m_CurrentGameBoardDimensions, playerOne, playerTwo);
                formGameBoard             = new FormGameBoard(this.m_GameLogicComponent, this.m_CurrentGameBoardDimensions);
            }

            return(formGameBoard);
        }