import settings
from components import Entity, Appearance, Senses, Brain, Attributes
from components.paper_doll import PaperDoll
from engine import colors, PLAYER_ID
from engine.enums import ControlMode, Faction


def make_player(zone_id):
    entity_id = PLAYER_ID

    return (
        entity_id,
        [
            Entity(id=entity_id, entity=entity_id, name='player', zone=zone_id),
            Appearance(entity=entity_id, symbol='@', color=colors.white),
            Senses(entity=entity_id, sight_radius=settings.TORCH_RADIUS),
            Brain(entity=entity_id, control_mode=ControlMode.PLAYER, faction=Faction.PLAYER, take_turn=True),
            Attributes(entity=entity_id, hp=300, max_hp=300),
            PaperDoll(entity=entity_id)
        ]
    )
