def singlePlayer(difficulty):
        '''Returns dictionary of players for singleplayer gameplay.'''
        
        players = {}

        newPlayer = player('play1')
        print('Player 1',end=' ')
        if not d.active:
            nameEntry = str(input('please enter your name: '))
            while newPlayer.setName(nameEntry):
                print('Invalid Entry!')
                print('Player 1',end=' ')
                nameEntry = str(input('please enter your name: '))
        else:
            newPlayer.setName("Debug")
            
        newPlayer.setSymbol('O')
        players['play1'] = newPlayer
        players['comp'] = computer(difficulty)

        return players
Returns dictionary of players for singleplayer gameplay.
recipes/Python/580723_TicTacToe_text_based/recipe-580723.py