Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/loo/rooms/wash_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ class WashRoom(AbstractRoom):
_BLOCKCHAIN_COMMANDS = ["grab blockchain", "blockchain"]
_COIN_COMMANDS = ["grab coin", "coin"]
def __init__(self):
self.dod = Item(name="DoD",
self.dod = Item(name="DoD",
message="hands washed?" + "\n" + "paper towels in bin?" + "\n" + "toilet flushed?")
self.blockchain = Item(name="blockchain",

self.blockchain = Item(name="blockchain",
message="Nice, now I have a blockchain in my pocket. Maybe I will become a Crpyto millionaire?!")
self.coin = Item(name="coin",

self.coin = Item(name="coin",
message="Eww, that wasn't a coin?!")
self.door = Item(name="door",

self.door = Item(name="door",
message="")

def get_description(self):
return "You enter a room that looks like a washroom."

def get_detailed_description(self):
return f"""You see a {self.coin} on the floor. \n
You also see an incredibly nasty sink with an undefinable substance in it. Ew! \n
You notice a {self.dod} on the door. \n
On the other side of the room you see two doors, one {self.door} to the hallway and another one to the loo. \n
On the other side of the room you see a {self.door} to the hallway; and behind you another door to the loo. \n
Oh, and there's a {self.blockchain} in the corner. Interesting.."""

def handle_command(self, command):
Expand All @@ -41,6 +41,6 @@ def handle_command(self, command):
return self.coin.message
case _:
return super().handle_command(command)

def get_help(self):
return super().get_help() + "try to 'look around', 'read DoD', or 'use door to hallway', or 'use door to loo', or 'grab coin', or 'grab blockchain'. Might help."
2 changes: 1 addition & 1 deletion tests/test_loo/test_rooms/test_washroom.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def test_greet(self):
assert washroom.get_detailed_description() == """You see a <mark>coin</mark> on the floor. \n
You also see an incredibly nasty sink with an undefinable substance in it. Ew! \n
You notice a <mark>DoD</mark> on the door. \n
On the other side of the room you see two doors, one <mark>door</mark> to the hallway and another one to the loo. \n
On the other side of the room you see a <mark>door</mark> to the hallway; and behind you another door to the loo. \n
Oh, and there's a <mark>blockchain</mark> in the corner. Interesting.."""

def test_blockchain(self):
Expand Down