We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23df5c4 commit e766b56Copy full SHA for e766b56
main.py
@@ -6,6 +6,8 @@ def __init__(self):
6
self.locations = {}
7
self.player = None
8
self.createLocations()
9
+ self.createPlayer()
10
+ print("Game initialised with no problems.")
11
12
def createLocations(self):
13
# Iterates through locations.json, dynamically creates Location objects, adds to Game.locations dictionary #
@@ -29,6 +31,11 @@ def createLocations(self):
29
31
# Add to Game.locations dictionary #
30
32
self.locations[index] = newLocation
33
34
+ def createPlayer(self):
35
+ # Create a Player object #
36
+ self.player = Player()
37
+ self.player.location = self.locations[self.player.position]
38
+
39
40
class Location:
41
def __init__(self, id_num, name):
0 commit comments