Skip to content

Commit 4880fe5

Browse files
committed
Created Player class and instantiated newPlayer with outside location.
1 parent 7c73625 commit 4880fe5

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

‎src/adv.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from room import Room
2+
from room import Player
23

34
# Declare all the rooms
45

@@ -39,6 +40,8 @@
3940

4041
# Make a new player object that is currently in the 'outside' room.
4142

43+
newPlayer = Player('outside')
44+
4245
# Write a loop that:
4346
#
4447
# * Prints the current room name

‎src/player.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
# Write a class to hold player information, e.g. what room they are in
22
# currently.
3+
4+
class Player:
5+
def __init__(self, location):
6+
self.location = location

0 commit comments

Comments
 (0)