adventure-game #3

Open
Kenwood wants to merge 80 commits from adventure-game into master
1 changed files with 7 additions and 1 deletions
Showing only changes of commit 2f8dd761ba - Show all commits

View File

@ -1,10 +1,12 @@
from yaml_parser import parse_datafile as parse
class Player:
"""
This class intended to abstract out the actual yaml data into a player.(item) that is more
friendly to handle in code.
"""
def __init__(self, save_location):
self.save_location = save_location
@ -16,3 +18,7 @@ class Player:
TODO: Put a check here that checks if the room we're moving to exists!
"""
self.playerData['player']['location'] = new_room
room = self.playerData['player']['location']
return parse('adventure_game/gamedata/world/' + room)['room']['upon_enter']