# Game import
from utils.serializable import Serializable

# Native imports
from enum import Enum

class TurnAction(Enum):
    DAMAGE = 'deal_damage'
    STATS = 'modify_stat'
    BASIC = 'basic_action'

class Turn(Serializable):
    def __init__(self):
        super().__init__()
        self.actions = {}
    
    def add_action(self, action_type:TurnAction, entity_id:str, description:str):
        self.actions[entity_id] = f'[{action_type.value}]: ' + description
    
    def is_finished(self, nb_entities:int):
        return len(self.actions.keys()) == nb_entities