Example #1
0
terminal.set("window: size=" + str(screen_width) + "x" + str(screen_height) +
             ";")

run = True
ml = MessageLog(dialog_width, dialog_height)
test_count = 0

game_objects = []
dialog_entities = []

player = GameObject(3, 3, '@', 'red', "Hero", True)
player.inventory = {}

##Keep track of which direction player is pointing, start up.
player.last_dx = 0
player.last_dy = -1
game_objects.append(player)

add_to_inventory(player.inventory, InventoryItem("Goblet"))
add_to_inventory(player.inventory, InventoryItem("Replacement Plugs", 11))

game_map = GameMap(map_width, map_height)
load_map(terminal, player, game_objects, game_map)
draw_map(terminal, game_map)
draw_all(terminal, game_objects, map_width, map_height)
terminal.refresh()
while run:
    action = None

    if terminal.has_input():
        action = terminal.read()