Files
agentic-labs-challenge-subm…/underdepths/entities/entity.py
T
2026-08-13 15:23:35 +02:00

19 lines
471 B
Python

"""Base entity: a thing with a position on the map."""
from __future__ import annotations
from dataclasses import dataclass
@dataclass(slots=True)
class Entity:
"""Anything that lives on a dungeon tile: player, enemies, items, stairs.
`sprite_key` names the procedural pixel-art sprite to rasterize for it.
`blocks` is True when other entities cannot share its tile.
"""
x: int
y: int
name: str
sprite_key: str
blocks: bool = True