This commit is contained in:
2021-05-26 16:36:59 -04:00
parent 3fff7ef498
commit d05eec6c03
5 changed files with 98 additions and 96 deletions

View File

@@ -2,6 +2,7 @@ import tcod
from engine import Engine
from entity import Entity
from game_map import GameMap
from input_handlers import EventHandler
@@ -10,6 +11,9 @@ def main():
screen_width = 80
screen_height = 50
map_width = 80
map_height = 45
room_max_size = 10
room_min_size = 6
max_rooms = 30
@@ -29,7 +33,9 @@ def main():
npc = Entity(int(screen_width/2), int(screen_height/2), '@', (255, 255, 0))
entities = {npc, player}
engine = Engine(entities=entities, event_handler=event_handler, player=player)
game_map = GameMap(map_width, map_height)
engine = Engine(entities=entities, event_handler=event_handler, game_map=game_map, player=player)
with tcod.context.new_terminal(
screen_width,