Skip to content

Commit e766b56

Browse files
added message to signal game loading with no problems.
1 parent 23df5c4 commit e766b56

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

main.py

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ def __init__(self):
66
self.locations = {}
77
self.player = None
88
self.createLocations()
9+
self.createPlayer()
10+
print("Game initialised with no problems.")
911

1012
def createLocations(self):
1113
# Iterates through locations.json, dynamically creates Location objects, adds to Game.locations dictionary #
@@ -29,6 +31,11 @@ def createLocations(self):
2931
# Add to Game.locations dictionary #
3032
self.locations[index] = newLocation
3133

34+
def createPlayer(self):
35+
# Create a Player object #
36+
self.player = Player()
37+
self.player.location = self.locations[self.player.position]
38+
3239

3340
class Location:
3441
def __init__(self, id_num, name):

0 commit comments

Comments
 (0)