feat: better state_handler

This commit is contained in:
2026-03-04 14:02:19 -03:00
parent 11ff4c0c21
commit 06ae9b41f0
17 changed files with 158 additions and 42 deletions

View File

@@ -0,0 +1,13 @@
from diceplayer.config import PlayerConfig
from diceplayer.logger import logger
import yaml
def read_input(infile) -> PlayerConfig:
try:
with open(infile, "r") as f:
return PlayerConfig.model_validate(yaml.safe_load(f))
except Exception as e:
logger.exception("Failed to read input file")
raise e