npyscreen-adventure-game #8
@@ -4,9 +4,9 @@ class ExitButton(npyscreen.ButtonPress):
|
|||||||
def whenPressed(self):
|
def whenPressed(self):
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
class GameNavigator(npyscreen.Form):
|
class GameNavigator(npyscreen.FormBaseNew):
|
||||||
def afterEditing(self):
|
def afterEditing(self):
|
||||||
self.parentApp.setNextForm(None) # Nothing to do after this but exit the game.
|
self.parentApp.setNextForm('GAME')
|
||||||
|
|
||||||
def create(self):
|
def create(self):
|
||||||
top_division_height = 20
|
top_division_height = 20
|
||||||
|
|||||||
7
Adventure Game/adventure_game/player.py
Normal file
7
Adventure Game/adventure_game/player.py
Normal file
@@ -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)
|
||||||
Reference in New Issue
Block a user