from __future__ import annotations from dataclasses import dataclass @dataclass(slots=True) class Entity: x: int y: int glyph: str color: tuple[int, int, int] name: str @property def position(self) -> tuple[int, int]: return self.x, self.y