Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
br80 committed Dec 14, 2019
1 parent 0208649 commit 772105e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions projects/adventure/adv.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
# map_file = "maps/test_loop_fork.txt"
map_file = "maps/main_maze.txt"

# Loads the map into a dictionary
room_graph=literal_eval(open(map_file, "r").read())
world.load_graph(room_graph)

# VIEW MAP
# Print an ASCII map
world.print_rooms()

player = Player("Name", world.starting_room)
player = Player(world.starting_room)

# Fill this out with directions to walk
# traversal_path = ['n', 'n']
Expand Down
3 changes: 1 addition & 2 deletions projects/adventure/player.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class Player:
def __init__(self, name, starting_room):
self.name = name
def __init__(self, starting_room):
self.current_room = starting_room
def travel(self, direction, show_rooms = False):
next_room = self.current_room.get_room_in_direction(direction)
Expand Down

0 comments on commit 772105e

Please sign in to comment.