Part 2 in progress.

This commit is contained in:
2021-05-26 13:31:34 -04:00
parent ca0f09cc07
commit 3fff7ef498
3 changed files with 81 additions and 60 deletions

View File

@@ -1,14 +1,16 @@
from typing import Tuple
class Entity:
"""
Generic object to represent players, enemies, items, etc.
"""
def __init__(self, x, y, char, color):
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, dy):
def move(self, dx: int, dy: int) -> None:
self.x += dx
self.y += dy