def test_hero_move(self): room0 = room() hero = Hero(room0) monster = Monster(room0) room0.print(hero, monster) hero.move() room0.print(hero, monster)
def test_room_generation7(self): t1 = time.time() room0 = room(200, 200) t0 = time.time() exec_time = t0 - t1 print("Nodes: ", room0.x * room0.y) print("Edges: ", room0.edges) print("Room Generation Time: ", exec_time)
def test_pursue_hero8(self): room0 = room(1000, 1000) hero = Hero(room0) monster = Monster(room0) t1 = time.time() monster.pursue_hero(hero, room0.get_room_nodes()) t0 = time.time() exec_time = t0 - t1 print("Nodes: ", room0.x * room0.y) print("Time: ", exec_time) print("Edges: ", room0.edges) print("done")
def test_hero_generation(self): room0 = room() hero = Hero(room0) monster = Monster(room0) room0.print(hero, monster)
def test_room_connection(self): room0 = room() connections = room0.get_room_nodes() print("Room Connections") print(connections.vertices)
def test_room_generation_1(self): room0 = room() print(room0.get_room_nodes())
import keyboard #print("Welcome to Rogue\n") #start = input("Press 'p' to Play\nPress 'q' to Quit") ans = True high_score = 0 once = False while ans: print("Welcome to Rogue\n") start = input("Press 'p' to Play.\nPress 'q' to Quit.\n") score = 1 if start == 'p': print("~~Game Start~~\n") room0 = room() hero = Hero(room0) monster = Monster(room0) while hero.die( monster ): # edge case for hero and monster starting at same spot hero = Hero(room0) room0.print(hero, monster) print("Game Start:\n") while 1: hero.move() if hero.at_exit is True: room0.print(hero, monster)