def health_status(player, enemy, target):
    """
    Checks the health status of the target
    :param player: The Player object
    :param enemy: The current/attacking enemy Combatant object
    :param target: A string for 'player' or 'enemy' to indicate which health to check
    :return: 0 if target is alive, 1 if target is defeated (related to action required or not)
    """
    if target == 'player':

        if player.HP == 0:
            print(f'{enemy.name} has defeated {player.name}!...')
            print(f'{player.name} awakens at the start of the maze'
                  f', bruised, embarrassed, and barely alive to fight another day...')
            print('* Your health points have been restored to 1 and you have moved to (0, 0) *\n')
            player.x_location = 0 
            player.y_location = 0 
            player.HP = 1
            return 1

        else:
            return 0

    elif target == 'enemy':

        if enemy.HP == 0:
            print(f'{player.name} defeated {enemy.name}!\n')
            enemy.defeated = 1
            return 1

        else:
            return 0