Files
RLD_CT/entity.py
2021-05-26 13:31:34 -04:00

16 lines
377 B
Python

from typing import Tuple
class Entity:
"""
Generic object to represent players, enemies, items, etc.
"""
def __init__(self, x: int, y: int, char: str, color: tuple[int, int, int]):
self.x = x
self.y = y
self.char = char
self.color = color
def move(self, dx: int, dy: int) -> None:
self.x += dx
self.y += dy