def make_player(self):
        """
        Make the player and sets location.
        """
        last_state = self.previous

        if last_state == 'battle':
            player = person.Player(self.game_data['last direction'], self.game_data)
            player.rect.x = self.game_data['last location'][0] * 32
            player.rect.y = self.game_data['last location'][1] * 32

        else:
            for object in self.renderer.tmx_data.getObjects():
                properties = object.__dict__
                if properties['name'] == 'start point':
                    if last_state == properties['state']:
                        posx = properties['x'] * 2
                        posy = (properties['y'] * 2) - 32
                        player = person.Player(properties['direction'],
                                               self.game_data)
                        player.rect.x = posx
                        player.rect.y = posy

        return player
dataset/ETHPy150Open justinmeister/The-Stolen-Crown-RPG/data/states/levels.py/LevelState.make_player/original