From 5437129a768c36f0fddf2978865e7379feee27bc Mon Sep 17 00:00:00 2001 From: Joe S <31870999+KenwoodFox@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:21:05 -0500 Subject: [PATCH] Eyy! fix bug 14, send button and ok button not working together --- Adventure Game/adventure_game/GameNavigator.py | 4 ++-- Adventure Game/adventure_game/player.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 Adventure Game/adventure_game/player.py diff --git a/Adventure Game/adventure_game/GameNavigator.py b/Adventure Game/adventure_game/GameNavigator.py index a342861..143430c 100644 --- a/Adventure Game/adventure_game/GameNavigator.py +++ b/Adventure Game/adventure_game/GameNavigator.py @@ -4,9 +4,9 @@ class ExitButton(npyscreen.ButtonPress): def whenPressed(self): sys.exit(0) -class GameNavigator(npyscreen.Form): +class GameNavigator(npyscreen.FormBaseNew): def afterEditing(self): - self.parentApp.setNextForm(None) # Nothing to do after this but exit the game. + self.parentApp.setNextForm('GAME') def create(self): top_division_height = 20 diff --git a/Adventure Game/adventure_game/player.py b/Adventure Game/adventure_game/player.py new file mode 100644 index 0000000..81620ec --- /dev/null +++ b/Adventure Game/adventure_game/player.py @@ -0,0 +1,7 @@ +from yaml_parser import parse_datafile as parse + +class Player: + def __init__(self, save_location): + self.save_location = save_location + + self.playerData = parse(save_location) \ No newline at end of file