Mehmet Kuecuek commited on
Commit
685abcb
1 Parent(s): e88b006

program to debugged

Browse files
Files changed (1) hide show
  1. rpbt.py +214 -0
rpbt.py ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import time
2
+ from os import system, name
3
+ import collections
4
+
5
+ # all bars are examples and can be modified
6
+ # START // INITIALISATION-SIMULATION
7
+ # establish list of names
8
+ # need to debug here
9
+ # program does not proceed
10
+
11
+ def intro():
12
+ while True:
13
+ names = [("cherry", "fearless", "rose")]
14
+ print(names)
15
+
16
+ select = input("Enter your name: ")
17
+ for select in names:
18
+ if select in names:
19
+ print("Battlename successfully selected")
20
+ else:
21
+ intro()
22
+ break
23
+ intro()
24
+
25
+ # flush the screen after intro
26
+ os.system('clear')
27
+
28
+ # check string with input
29
+ def simulation():
30
+ for x in names:
31
+ if select in names:
32
+ time.sleep(1)
33
+ dot = "."
34
+ print(dot*3 + "processing data" + dot*3)
35
+ time.sleep(2)
36
+ print("Please wait. ")
37
+ time.sleep(3)
38
+ print("Name chosen. ")
39
+ time.sleep(1)
40
+ break
41
+
42
+ simulation()
43
+
44
+ # flushing the screen again
45
+ os.system('clear')
46
+
47
+ # battle starts
48
+ def simulation2():
49
+ print("You wanna rhyme against me? ")
50
+ print("Let's see, what you got!")
51
+ time.sleep(2)
52
+ print("Are ")
53
+ time.sleep(1)
54
+ print("you ")
55
+ time.sleep(1)
56
+ print("READY? ")
57
+ # write a timer / counter
58
+
59
+ simulation2()
60
+
61
+ def simulation3():
62
+ time.sleep(2)
63
+ print("Let's go in..." + "3" + "..." )
64
+ time.sleep(1)
65
+ print("Let's go in..." + "2" + "...")
66
+ time.sleep(1)
67
+ print("Let's go in..." + "1" + "...")
68
+
69
+ simulation3()
70
+
71
+ # RAP BATTLE // ACTUAL ENCOUNTER
72
+ # 1st ROUND OF BATTLE
73
+
74
+ class Battle:
75
+ class Round1:
76
+ while True:
77
+ def bars():
78
+ bar1 = str("I rhyme fine!")
79
+ bar2 = str("I rhyme great!")
80
+ bar3 = str("I am the best in the state!")
81
+ # mix 1st round syntax
82
+ syntax_bot = [str(bar1), str(bar2), str(bar3)]
83
+ print(syntax_bot)
84
+ # creating loops for barsdef bars_loop()
85
+ for y in syntax_bot:
86
+ if y in syntax_bot:
87
+ print(bar1)
88
+ print(bar2)
89
+ print(bar3)
90
+ break
91
+ # print the options the rhymer has / 1st round
92
+ def options():
93
+ rhyme01 = str("1. I am greater! ")
94
+ rhyme02 = str("2. I rhyme great! ")
95
+ rhyme03 = str("3. You ain't a saint, the worst in the state!")
96
+ player_rhymes = (str(rhyme01), str(rhyme02), str(rhyme03))
97
+ print(player_rhymes)
98
+ # player has to put input into the game
99
+ time.sleep(1)
100
+ rhyme_user = str(input("Enter your rhyme sucker: "))
101
+ # compare rhyme from user with syntax from bot
102
+ def compare():
103
+ for z in syntax_bot:
104
+ if rhyme_user == rhyme01:
105
+ print("Nice try fella! ")
106
+ print("Try again! ")
107
+ print(str(input("Enter your rhyme sucker: ")))
108
+ else:
109
+ print(False)
110
+ return()
111
+ if rhyme_user == rhyme02:
112
+ print("Why are you telling the same thing, as i do? ")
113
+ print("Try again! ")
114
+ print(str(input("Enter your rhyme sucker: ")))
115
+ else:
116
+ print(False)
117
+ break
118
+ if rhyme_user == rhyme03:
119
+ print("AAAAAAHHHHHH! ")
120
+ print("You beat me once" + ", " + "Let's see, what you will do in the next round! ")
121
+ print(True)
122
+ break
123
+ # 2nd ROUND OF BATTLE
124
+ class Round2:
125
+ while True:
126
+ def bars2():
127
+ bar4 = str("I am straight! ")
128
+ bar5 = str("Big my brain! ")
129
+ bar6 = str("Skilled and insane! ")
130
+ syntax_bot2 = [str(bar4), str(bar5), str(bar6)]
131
+ print(syntax_bot2)
132
+ # creating loop2 for syntax02
133
+ def bars_loop2():
134
+ for i in syntax_bot2:
135
+ if i in syntax_bot2:
136
+ print(bar4)
137
+ print(bar5)
138
+ print(bar6)
139
+ break
140
+ # print the options the rhymer has
141
+ def options2():
142
+ rhyme04 = str("1. You are late! ")
143
+ rhyme05 = str("2. Big my brain! ")
144
+ rhyme06 = str("3. You just faint and i maintain! ")
145
+ player_rhymes = (str(rhyme04), str(rhyme05), str(rhyme06))
146
+ print(player_rhymes)
147
+ # player has to put input into the game
148
+ rhyme_user2 = str(input("Enter your rhyme sucker: "))
149
+ # compare rhyme from user with syntax from bot
150
+ def compare2():
151
+ for i in syntax_bot2:
152
+ if rhyme_user2 == rhyme04:
153
+ print("Nice try fella! ")
154
+ print("Try again! ")
155
+ print(str(input("Enter your rhyme sucker: ")))
156
+ else:
157
+ print(False)
158
+ break
159
+ if rhyme_user == rhyme05:
160
+ print("Why are you telling the same thing, as i do? ")
161
+ print("Try again! ")
162
+ print(str(input("Enter your rhyme sucker: ")))
163
+ else:
164
+ print(False)
165
+ break
166
+ if rhyme_user == rhyme06:
167
+ print("You beat me twice, let us see next round")
168
+ break
169
+ class Round3:
170
+ while True:
171
+ def bars3():
172
+ bar7 = str("Killer instinct. ")
173
+ bar8 = str("Kill you with one ink. ")
174
+ bar9 = str("Don't try me, otherwise you go exstinct. ")
175
+ # mix 1st round syntax
176
+ syntax_bot3 = [str(bar7), str(bar8), str(bar9)]
177
+ print(syntax_bot3)
178
+ # creating loops
179
+ def bars_loop3():
180
+ for y in syntax_bot3:
181
+ print(bar7)
182
+ print(bar8)
183
+ print(bar9)
184
+ break
185
+ # print the options the rhymer has
186
+ def options3():
187
+ rhyme07 = str("1. I am greater! ")
188
+ rhyme08 = str("2. Kill you with one ink. ")
189
+ rhyme09 = str("3. You fake n-sync, i terminate before an eye blink! ")
190
+ player_rhymes = (str(rhyme07), str(rhyme08), str(rhyme09))
191
+ print(player_rhymes)
192
+ # player has to put input into the game
193
+ rhyme_user3 = str(input("Enter your rhyme sucker: "))
194
+ # compare rhyme from user with syntax from bot
195
+ def compare3():
196
+ for b in syntax_bot3:
197
+ if rhyme_user == rhyme07:
198
+ print("Nice try fella! ")
199
+ print("Try again! ")
200
+ print(str(input("Enter your rhyme sucker: ")))
201
+ else:
202
+ print(False)
203
+ break
204
+ if rhyme_user == rhyme08:
205
+ print("Why are you telling the same thing, as i do? ")
206
+ print("Try again! ")
207
+ print(str(input("Enter your rhyme sucker: ")))
208
+ else:
209
+ print(False)
210
+ break
211
+ if rhyme_user == rhyme09:
212
+ print("AAAAAAHHHHHH! ")
213
+ print("You won! "+ ", " + "Let me mourn my defeat rap-samurai! ")
214
+ break