xxxxxxxxxx
1# Sarah Elgindy
2
3def main_menu():
4print()
5print(' =^..^= ' * 10)
6print()
7print("Welcome to Rumi's Quest!")
8print()
9print("Rumi has spent the day running from his family's Husky puppy he so affectionately named, "
10'Xena: The Bone Nibbler!')
11print('He desperately needs a nap and he is getting cranky!')
12print('Unfortunately, Xena scattered his bedding across the house.')
13print('Help Rumi collect his bedding and items to distract Xena so he can finally get some rest!')
14print()
15print('To move Rumi between rooms type: North, South, West, East.')
16print("To add an item to Rumi's inventory simply type the item name in the command prompt.")
17print()
18
19def player_error():
20print('Rumi continues to stare into space getting crankier by the minute.')
21print('Please try again!')
22
23def player_error_direction():
24print(' =^..^= ' * 10)
25print()
26print('Oops! Rumi trips over his tail and face plants onto the carpet.')
27print('Rumi looks around to make sure nobody saw his misstep.')
28print('Sleep deprivation is making him cranky! Please try again!')
29print('⠀⠀⠀⢠⣾⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
30print('⠀⠀⣰⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
31print('⠀⢰⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
32print('⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
33print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
34print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣄⣀⣀⣤⣤⣶⣾⣿⣿⣿⡷')
35print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁')
36print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀')
37print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀')
38print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀')
39print('⣿⣿⣿⡇⠀⡾⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀')
40print('⣿⣿⣿⣧⡀⠁⣀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀')
41print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠉⢹⠉⠙⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀')
42print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣀⠀⣀⣼⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀')
43print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀')
44print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀')
45print('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠀⠤⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
46print('⣿⣿⣿⣿⠿⣿⣿⣿⣿⣿⣿⣿⠿⠋⢃⠈⠢⡁⠒⠄⡀⠈⠁⠀⠀⠀⠀⠀⠀')
47print('⣿⣿⠟⠁⠀⠀⠈⠉⠉⠁⠀⠀⠀⠀⠈⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
48print('⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
49
50def player_lose():
51print(' =^..^= ' * 10)
52print()
53print('Oh, no! Rumi encountered Xena before he gathered all of his bedding and items to to distract her with!')
54print("Rumi ran under the bed and probably won't be able to sleep for awhile yet!")
55print('Better luck next time! Goodbye!')
56print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣆⠀')
57print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⢀⣾⣿⣿⢀')
58print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿')
59print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣸⣿⣿⣿⣿⣿⡏')
60print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⡅')
61print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣴⣿⣿⣿⣿⣿⣿⣿⡇')
62print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⡆')
63print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⣀⣀⣤⠄⠀⠀⠀⠀⠀⠀⠀⠀⡀⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀')
64print('⠀⠀⠀⠀⠀⢰⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⣠⣴⣾⣵⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⠀')
65print('⠀⠀⠀⠀⠀⣾⣿⣿⣿⣧⠀⣀⣀⣀⣀⣀⣀⡀⠀⢀⣤⣶⣿⣿⡇⢀⡄⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⡀⠀⠀⢀⢹⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀')
66print('⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢡⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣏⠀⠀')
67print('⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣵⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀')
68print('⠀⠀⠀⠀⢠⣾⣿⣿⠟⠋⠛⣿⣿⣿⣿⣿⡿⠋⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⢹⣿⣿⣿⣿⣿⣿⣿⠋⠀⠀⠀')
69print('⠀⠀⠀⠀⣾⣿⣿⡇⢀⣤⠀⢸⣿⣿⣿⣿⠀⣠⡀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⠂⣼⣿⣿⣿⣿⣿⣿⣷⠃⠀⠀⠀')
70print('⠀⠀⠀⠀⣿⣿⣿⣧⣾⣿⣤⣼⡇⣿⣿⣿⣸⣿⣇⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣴⣿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀')
71print('⣀⣀⣠⣤⣽⣿⣿⣿⣿⣿⣿⣿⣷⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⠀⠀⠀⠀⠀⠀')
72print('⠀⢀⣠⡬⢿⣿⣿⣿⣿⣿⣿⠟⠉⠉⠙⢿⣿⣿⣛⣭⣥⣶⣶⣶⣶⣮⣭⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀')
73print('⠀⠀⠀⠀⠴⠶⠛⠛⠻⣿⣿⣶⣿⣿⣷⣾⣿⣿⣟⡛⠿⢷⣶⣶⣶⣿⣿⣿⣿⣿⠿⠛⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠂⠀⠀⠀⠀⠀⠀⠀⠀')
74print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠿⠿⠟⠛⢹⣿⣿⣿⣿⣶⣽⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⢘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
75print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
76print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
77print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⠀⠀⠀⠾⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
78print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠐⣻⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
79print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠛⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
80print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⢻⠿⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
81print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
82print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
83print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
84print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
85print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
86print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
87print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⡇⠀⠀⠀⠀⠀⢀⣴⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
88print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠾⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
89def player_win():
90print(' =^..^= ' * 10)
91print()
92print('Rumi sees Xena and tosses the bone dog treat and dog squeak toy outside the bedroom door!')
93print('Xena runs outside the room. Rumi closes the door behind her.')
94print('Rumi sets up his bed on the floor next to the dresser and drifts off to asleep!')
95print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣶⣶⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
96print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣽⡿⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
97print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣤⠶⠟⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
98print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠷⠶⢤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
99print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⣶⣶⣶⡶⠀⠀⠀⠉⠻⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
100print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣾⣿⣟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
101print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠙⠻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
102print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⡀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
103print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣤⡶⠶⠶⠟⠿⠿⠛⠋⠋⠛⠛⠛⠳⠶⣤⣤⣤⣤⣤⣄⣤⣶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
104print('⢀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣶⣴⠶⠿⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠃⠀⠉⠉⠋⣰⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
105print('⢸⣿⠾⠿⠿⠟⠛⠛⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
106print('⠈⣿⣄⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
107print('⠀⠈⠻⣦⣀⠀⣼⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⡋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
108print('⠀⠀⠀⠈⠙⢻⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
109print('⠀⠀⠀⠀⠀⠈⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⠀⣀⣾⡯⠽⡛⠛⠳⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀')
110print('⠀⠀⠀⠀⠀⠀⣿⡆⠀⠀⠀⠀⠀⠀⠀⣀⣀⡀⠀⠀⠀⠀⠀⠀⢿⣶⠴⠶⠛⠛⠛⠉⣼⣾⣿⣿⡋⠉⠉⠻⠂⠈⢿⣦⣀⣠⣤⣤⣤⣄⣀⠀⠀⠀⠀')
111print('⠀⠀⠀⢀⣤⣶⣿⣥⣤⡛⠛⠿⠿⠿⠿⠿⠛⠁⠀⠀⣀⣤⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⡿⠷⠿⣷⣍⠉⠓⠒⠀⠀⠀⠈⢻⡉⠉⠉⠙⡋⠉⠙⠳⣦⠀')
112print('⠀⠀⠰⢋⡭⠖⣹⣿⡿⣿⣤⣄⣀⣀⣀⠀⠀⠀⠀⠀⠙⠋⠁⠀⠀⠀⠀⣠⣴⡿⠋⠁⠀⠀⠀⢼⠟⠀⠀⠀⠀⠀⠀⢰⣾⣿⣥⣴⣦⣶⣶⠀⢠⢿⡧')
113print('⠀⢠⡖⠋⣀⡼⠛⣽⡿⠻⠉⠉⠉⠉⠙⠻⢶⣦⣄⡀⠀⠀⠀⠀⠀⢀⣴⡿⠋⠀⠀⠀⠀⠀⢀⣦⠀⠀⠀⠀⠀⠀⣴⣿⠏⠀⠀⣠⣴⡿⠏⠀⣼⣾⡇')
114print('⠀⠈⢀⣴⠟⠀⢸⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⢿⣦⡀⠀⠀⢀⣼⡿⠁⠀⠀⠀⠀⠀⣠⣾⠃⢀⣠⣤⣴⣶⡿⠟⢁⣴⣾⠟⠋⠁⠀⢀⣼⣿⠏⠀')
115print('⠀⠀⠘⠛⠀⠀⢸⣧⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣶⡶⢾⡟⠁⠀⠀⣀⣤⡶⠿⠟⠙⠛⠛⠉⠉⠉⠀⣠⣴⡿⠏⠀⠀⢀⣠⣴⣿⡿⠛⠀⠀')
116print('⠀⠀⠀⠀⠀⠀⠀⠈⠙⠓⠒⠦⣤⣀⠀⠀⠀⣀⠀⠀⢀⣬⡿⠀⠘⠷⢶⡶⠾⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣐⣦⣲⣿⣿⡿⠛⠋⠀⠀⠀⠀')
117print('⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠛⠲⠾⠿⠟⠛⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠙⠛⠛⠋⠉⠁⠀⠀⠀⠀⠀⠀⠀')
118
119def player_location(currentRoom):
120print(' =^..^= ' * 10)
121print()
122print('Rumi is in the {}.'.format(currentRoom['name']))
123print('Rumi sees a {} in the room.'.format(currentRoom['item']))
124print()
125print(' =^..^= ' * 10)
126return currentRoom
127
128def player_location_empty(currentRoom):
129print(' =^..^= ' * 10)
130print()
131print('Rumi is in the {}.'.format(currentRoom['name']))
132print('Rumi sees {} in the room.'.format(currentRoom['item']))
133print()
134print(' =^..^= ' * 10)
135return currentRoom
136
137def main():
138main_menu()
139rooms = {
140'Foyer': {'name': 'Foyer', 'west': 'Sunroom', 'item': 'nothing of interest'},
141'Sunroom': {'name': 'Sunroom', 'south': 'Living Room', 'east': 'Foyer', 'item': 'red blanket'},
142'Living Room': {'name': 'Living Room', 'north': 'Sunroom', 'east': 'Bathroom', 'west': 'Guest Bedroom',
143'south': 'Dining Room', 'item': 'white dove toy'},
144'Guest Bedroom': {'name': 'Guest Bedroom', 'east': 'Living Room', 'item': 'bone dog treat'},
145'Dining Room': {'name': 'Dining Room', 'north': 'Living Room', 'east': 'Kitchen', 'item': 'dog squeak toy'},
146'Kitchen': {'name': 'Kitchen', 'west': 'Dining Room', 'item': 'black cat bed'},
147'Bathroom': {'name': 'Bathroom', 'north': 'Master Bedroom', 'west': 'Living Room', 'item': 'green fish pillow'},
148'Master Bedroom': {'name': 'Master Bedroom', 'south': 'Bathroom', 'item': 'Xena The Bone Nibbler!'}
149}
150
151player_inventory = []
152currentRoom = rooms['Foyer']
153commands = ['north', 'south', 'west', 'east']
154player_end = False
155option = 'y'
156while (player_end is False) and (option == 'y'):
157if currentRoom['item'] in player_inventory:
158print('Rumi is in the {}.'.format(currentRoom['name']))
159player_command = input('\nGive Rumi a command: ')
160command = player_command.lower()
161else:
162if currentRoom['item'] not in rooms['Foyer']['item']:
163player_location(currentRoom)
164player_command = input('\nGive Rumi a command: ')
165command = player_command.lower()
166else:
167player_location_empty(currentRoom)
168player_command = input('\nGive Rumi a command: ')
169command = player_command.lower()
170if command in commands:
171if command in currentRoom:
172if ((currentRoom['item'] not in player_inventory)
173and currentRoom['item'] != rooms['Foyer']['item']):
174print('Rumi heads' + command + ' leaving behind a ' + currentRoom['item'] + '.')
175else:
176print('Rumi heads ' + command + '.')
177currentRoom = rooms[currentRoom[command]]
178print('Rumi has collected: {}.'.format(player_inventory))
179if (currentRoom == rooms['Master Bedroom']):
180if len(player_inventory) < 5:
181player_inventory = []
182currentRoom = rooms['Foyer']
183player_lose()
184player_option = input('\nDo you want to try again? y/n ')
185option = player_option.lower()
186if option != 'y':
187player_end is TRUE
188else:
189player_inventory = []
190currentRoom = rooms['Foyer']
191player_win()
192player_option = input('\nDo you want to try again? y/n ')
193option = player_option.lower()
194if option != 'y':
195player_end is TRUE
196else:
197player_error_direction()
198elif command in currentRoom['item']:
199if command not in rooms['Foyer']['item']:
200player_inventory.append("" + currentRoom['item'])
201print('Rumi grabbed the {}.'.format(currentRoom['item']))
202print('Rumi has collected: {}.'.format(player_inventory))
203else:
204print('Rumi does not appreciate the sarcasm.')
205print('Rumi continues to stare into space getting crankier by the minute.')
206print('Please try again!')
207else:
208player_error()
209print()
210
211main()
=^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= Welcome to Rumi's Quest! Rumi has spent the day running from his family's Husky puppy he so affectionately named, Xena: The Bone Nibbler! He desperately needs a nap and he is getting cranky! Unfortunately, Xena scattered his bedding across the house. Help Rumi collect his bedding and items to distract Xena so he can finally get some rest! To move Rumi between rooms type: North, South, West, East. To add an item to Rumi's inventory simply type the item name in the command prompt. =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= Rumi is in the Foyer. Rumi sees nothing of interest in the room. =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^=Variables:
Renaming a project helps you organise your saved code
Be careful: if you choose to delete a file, you will not be able to recover it unless you've saved a copy
create.withcode.uk allows you to write, run, debug and share python code in your web browser.
Anyone can access your code using this link:
Copy and paste this html to embed your code in a blog / website:
You will need this plugin installed on your site first.