@ReubenBakas/

ImpassionedFlusteredApplicationprogrammer-1

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import time
import random
import sys
print("You are about to embark on a journey to a castle")
def main():
    answer = input("Which path will you take? Left or right?(lowercase anything you type in)")
    comp=random.randint(1,12)
    Left = "left"
    Right = "right"
    if answer == Left and comp== 1:
        print("You are taking the journey the long way!")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 2:
        print("You are heading near the sea.")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 3:
        print("It looks you're heading into the forest. You see a castle ahead.")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 4:
        print("You are taking the journey the short way.")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 5:
        print("You are lost you die")
        exit()
    if answer == Left and comp== 6:
        print("You are hading towards wolves")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 7:
        print("The castle is a long way from here.")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 8:
        print("You are there, well done")
        print("   AA")
        print("  AWWA")
        print(" AMMMMA")
        print("  WWWW")
        print("  MMMM")
        print("AMMMMMA A A A A A A A  ")
        print("WWWWWWWWWWWWWWWWWWWWW")
        print("MMMMMMMMMMMMMMMMMMMMM")
        print("MM MMMMMMMMMMMMMMM MM")
        print("WWWWWWWWWWWWWWWWWWWWW")
        print("WW WWWWWWWWWWWWWWW WW")
        print("MMMMMMMM:::::MMMMMMMM")
        print("WWWWWWWW     WWWWWWWW")
        print("MMMMMMMM     MMMMMMMM")
        exit()
    if answer == Left and comp== 9:
        print("You are next to a river")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 10:
        print("There is a river up ahead")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 11:
        print("You are nearing a village")
        print()
        time.sleep(0.25)
    if answer == Left and comp== 12:
        print("You sit down a while and play video games")
        loading = True  
        loading_speed = 4 
        loading_string = "." * 6  
        while loading:
         for index, char in enumerate(loading_string):
             sys.stdout.write(char)  
             sys.stdout.flush()  
             time.sleep(1.5 / loading_speed) 
         index += 1  
         sys.stdout.write("\b" * index + " " * index + "\b" * index)
         sys.stdout.flush() 
         print()
         main()
    if answer == Right and comp== 1:
        print("You are lost because of your map reading skills")
        print ("you die")
        answer3 = input("Would you like to carry on?")
        
    if answer == Right and comp== 2:
        print("You are taking the journey the long way!")
        print()
        time.sleep(0.25)
    if answer == Right and comp== 3:
        print("You are scared")
        print()
        time.sleep(0.25)
    if answer == Right and comp== 4:
        print("You find another person trying to find the castle. you lend help")
        loading = True  
        loading_speed = 4 
        loading_string = "." * 6  
        while loading:
         for index, char in enumerate(loading_string):
             sys.stdout.write(char)  
             sys.stdout.flush()  
             time.sleep(2 / loading_speed) 
         index += 1  
         sys.stdout.write("\b" * index + " " * index + "\b" * index)
         sys.stdout.flush() 
         print()
         main()
    if answer == Right and comp== 5:
        print("You are on a good adventure")
        print()
        time.sleep(0.25)
    if answer == Right and comp== 6:
        print("the king happens to be walking towards you and tells you to leave")
        exit()
    if answer == Right and comp== 7:
        print("You hear some birds tweeting")
        print()
        time.sleep(0.25)
    if answer == Right and comp== 8:
        print("You need to sleep as you are tired")
        time.sleep(2)
        loading = True  
        loading_speed = 4 
        loading_string = "." * 6  
        while loading:
         for index, char in enumerate(loading_string):
             sys.stdout.write(char)  
             sys.stdout.flush()  
             time.sleep(2.3 / loading_speed) 
         index += 1  
         sys.stdout.write("\b" * index + " " * index + "\b" * index)
         sys.stdout.flush() 
         print()
         main()
    if answer == Right and comp== 9:
        print("You wait a few seconds")
        loading = True  
        loading_speed = 4 
        loading_string = "." * 6  
        while loading:
         for index, char in enumerate(loading_string):
             sys.stdout.write(char)  
             sys.stdout.flush()  
             time.sleep(1.5 / loading_speed) 
         index += 1  
         sys.stdout.write("\b" * index + " " * index + "\b" * index)
         sys.stdout.flush() 
         print()
         main()
    if answer == Right and comp== 10:
        print("wolves find and kill you")
        exit()
    if answer == Right and comp== 11:
        print("You have a very long way to go")
        print()
        time.sleep(0.25)
    if answer == Right and comp== 12:
        print("Someone passes you and gives you directions")
        loading = True  
        loading_speed = 4 
        loading_string = "." * 6  
        while loading:
         for index, char in enumerate(loading_string):
             sys.stdout.write(char)  
             sys.stdout.flush()  
             time.sleep(2 / loading_speed) 
         index += 1  
         sys.stdout.write("\b" * index + " " * index + "\b" * index)
         sys.stdout.flush() 
         print()
         main()
    else:
      main()
time.sleep(0.05)
main()