-
Notifications
You must be signed in to change notification settings - Fork 0
/
rps-mp.py
600 lines (490 loc) · 39.3 KB
/
rps-mp.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
##This is my version of a multiplayer rock, paper, scissors, game.
#Imports the "random" module. Used to randomly select a value from a list.
import random
#Imports the "getpass" module. Used to hide user input for certain variables.
import getpass
#Establishes a while loop to restart the program.
while True:
#Prints a welcome message and question for the user to the terminal.
print('Welcome to the multiplayer version of Rock, Paper, Scissors. You can have up to 3 players total. Would you like to play? ')
#Requests input from the user to start the game.
start_game = input('Yes or No: ')
#Defines an if statement that checks for a certain string, after being capitalized with the .capitalize method, input to the variable.
if start_game.capitalize() == 'Yes':
#Prints a string to the terminal. Used to aesthetically separate text.
print('-------------------------------------------')
#Establishes a while loop. Used to restart the game.
while True:
print('How many players do you have? ')
#Defines a variable to contain input from the user. This input will decide the amount of players for the game.
player_count = input('Number of Players: ')
#Defines an if statement for if the variable contains a '1' string.
if player_count == '1':
print('-------------------------------------------')
#Prints a string that includes the data provided in the "player_count" variable.
print('You have chosen ' + player_count + ' ' + 'player. Is that correct? ')
singleplayer_confirm = input('Yes or No: ')
if singleplayer_confirm.capitalize() == 'Yes':
#Establishes a while loop. Used to restart a singleplayer game.
while True:
#A set of print statements acting as a read out for a real-life game of RPS.
print('-------------------------------------------')
print('Alright. Time to play Rock, Paper, Scissors.')
print('.')
print('.')
print('.')
print('Rock')
print('.')
print('.')
print('.')
print('Paper')
print('.')
print('.')
print('.')
print('Scissors')
print('.')
print('.')
print('.')
print('SHOOT!')
print('-------------------------------------------')
#Uses the method .choice() provided by the "random" module to choose a random value from the argument and puts the value in the rps_result variable.
rps_result = random.choice(['Rock', 'Paper', 'Scissors'])
#Prints the data contained in the rps_result variable with a string.
print('The result is: ' + rps_result)
print('-------------------------------------------')
print('Want to play again?')
singleplayer_start_again = input('Yes or No: ')
if singleplayer_start_again.capitalize() == 'Yes':
print('-------------------------------------------')
#Skips all other code left in the loop and initiates the loop.
continue
#Defines an elif statment for if the user, after the data is capitalized, has provided 'No' to the variable.
elif singleplayer_start_again.capitalize() == 'No':
#Prints a goodbye message to the user.
print('Okay. Goodbye')
#Breaks the while loop.
exit()
#Defines an else statement for any other inputs.
else:
#Prints a message to the user that tells them their input was invalid.
print('Invalid input. Try again.')
print('-------------------------------------------')
continue
elif singleplayer_confirm.capitalize() == 'No':
print('Input the correct player count.')
print('-------------------------------------------')
continue
else:
print('Invalid input. Try again.')
print('-------------------------------------------')
continue
elif player_count == '2':
print('-------------------------------------------')
print('You have chosen ' + player_count + ' ' + 'players. Is that correct? ')
two_player_confirm = input('Yes or No: ')
if two_player_confirm.capitalize() == 'Yes':
#All the print statements and variables defined or executed here are used to let players choose their player name for the game.
print('-------------------------------------------')
print('Both players will now input what their Player Name should be.')
print('-------------------------------------------')
print('Player 1, what would you like your name to be?')
two_player_player1_name = input('Player 1 Name: ')
print(two_player_player1_name + ' ' + 'is the name you have submitted.')
print('-------------------------------------------')
print('Player 2, what would you like your name to be?')
two_player_player2_name = input('Player 2 Name: ')
print(two_player_player2_name + ' ' + 'is the name you have submitted.')
print('-------------------------------------------')
print(two_player_player1_name + ' ' + 'and ' + two_player_player2_name + ' it is time to play Rock, Player, Scissors.')
print('-------------------------------------------')
print('Neither ' + two_player_player1_name + ' or ' + two_player_player2_name + ' will be able to see your answers until both of you have submitted your choices.')
print('-------------------------------------------')
#Establishes a while loop. Used to restart a two-player game.
while True:
print(two_player_player1_name + ' get ready to make your choice. When you are ready, put your answer in below.')
print('-------------------------------------------')
#These sets of variables will contain the choices of the players and of the program. The player's choices will be hidden to them until after both are submitted.
two_player_player1_choice = getpass.getpass(two_player_player1_name + ' choice: ')
two_player_player2_choice = getpass.getpass(two_player_player2_name + ' choice: ')
two_player_rng_choice = random.choice(['Rock', 'Paper', 'Scissors'])
print('-------------------------------------------')
print('All the choices have been submitted. Here is what was chosen: ')
print(two_player_player1_name + ' chose: ' + two_player_player1_choice.capitalize())
print(two_player_player2_name + ' chose: ' + two_player_player2_choice.capitalize())
print('Finally, the game chose: ' + two_player_rng_choice)
print('-------------------------------------------')
#Defines these two variables to contain the 0 integer. They will be used for the scoreboard system.
two_player_player1_score = 0
two_player_player2_score = 0
#The following if/elif/else statements are used to check the choices made by the players and the program.
if two_player_player1_choice.capitalize() == 'Rock':
if two_player_player1_choice.capitalize() == two_player_rng_choice:
print(two_player_player1_name + ' did not win or lose.')
#Defines a variable that will be used to display the amount of points each player has.
#This may seem useless, however, if it is not done, the program will consider this variable "undefined".
two_player_player1_score_points = two_player_player1_score + 0
print('0 points have been awarded to ' + two_player_player1_name)
print('-------------------------------------------')
elif two_player_player1_choice.capitalize() == 'Rock' and two_player_rng_choice == 'Scissors':
print('Rock beats scissors.')
print(two_player_player1_name + ' has earned a point.')
two_player_player1_score_points = int(two_player_player1_score) + 1
print('-------------------------------------------')
elif two_player_player1_choice.capitalize() == 'Rock' and two_player_rng_choice == 'Paper':
print('Paper beats rock.')
print(two_player_player1_name + ' has lost a point.')
two_player_player1_score_points = int(two_player_player1_score) - 1
print('-------------------------------------------')
else:
print('.')
elif two_player_player1_choice.capitalize() == 'Paper':
if two_player_player1_choice.capitalize() == two_player_rng_choice:
print(two_player_player1_name + ' did not win or lose.')
two_player_player1_score_points = two_player_player1_score + 0
print('0 points have been awarded to ' + two_player_player1_name)
print('-------------------------------------------')
elif two_player_player1_choice.capitalize() == 'Paper' and two_player_rng_choice == 'Rock':
print('Paper beats rock.')
print(two_player_player1_name + ' has earned a point.')
two_player_player1_score_points = int(two_player_player1_score) + 1
print('-------------------------------------------')
elif two_player_player1_choice.capitalize() == 'Paper' and two_player_rng_choice == 'Scissors':
print('Scissors beats paper.')
print(two_player_player1_name + ' has lost a point.')
two_player_player1_score_points = int(two_player_player1_score) - 1
print('-------------------------------------------')
else:
print('.')
elif two_player_player1_choice.capitalize() == 'Scissors':
if two_player_player1_choice.capitalize() == two_player_rng_choice:
print(two_player_player1_name + ' did not win or lose.')
two_player_player1_score_points = two_player_player1_score + 0
print('0 points have been awarded to ' + two_player_player1_name)
print('-------------------------------------------')
elif two_player_player1_choice.capitalize() == 'Scissors' and two_player_rng_choice == 'Paper':
print('Scissors beats paper.')
print(two_player_player1_name + ' has earned a point.')
two_player_player1_score_points = int(two_player_player1_score) + 1
print('-------------------------------------------')
elif two_player_player1_choice.capitalize() == 'Scissors' and two_player_rng_choice == 'Rock':
print('Scissors beats paper.')
print(two_player_player1_name + ' has lost a point.')
two_player_player1_score_points = int(two_player_player1_score) - 1
print('-------------------------------------------')
else:
print('.')
else:
print('An invalid input was made. Try again.')
print('-------------------------------------------')
continue
if two_player_player2_choice.capitalize() == 'Rock':
if two_player_player2_choice.capitalize() == two_player_rng_choice:
print(two_player_player2_name + ' did not win or lose.')
two_player_player2_score_points = two_player_player2_score + 0
print('0 points have been awarded to ' + two_player_player2_name)
print('-------------------------------------------')
elif two_player_player2_choice.capitalize() == 'Rock' and two_player_rng_choice == 'Scissors':
print('Rock beats scissors.')
print(two_player_player2_name + ' has earned a point.')
two_player_player2_score_points = int(two_player_player2_score) + 1
print('-------------------------------------------')
elif two_player_player2_choice.capitalize() == 'Rock' and two_player_rng_choice == 'Paper':
print('Paper beats rock.')
print(two_player_player2_name + ' has lost a point.')
two_player_player2_score_points = int(two_player_player2_score) - 1
print('-------------------------------------------')
elif two_player_player2_choice.capitalize() == 'Paper':
if two_player_player2_choice.capitalize() == two_player_rng_choice:
print(two_player_player2_name + ' did not win or lose.')
two_player_player2_score_points = two_player_player2_score + 0
print('0 points have been awarded to ' + two_player_player2_name)
print('-------------------------------------------')
elif two_player_player2_choice.capitalize() == 'Paper' and two_player_rng_choice == 'Rock':
print('Paper beats rock.')
print(two_player_player2_name + ' has earned a point.')
two_player_player2_score_points = int(two_player_player2_score) + 1
print('-------------------------------------------')
elif two_player_player2_choice.capitalize() == 'Paper' and two_player_rng_choice == 'Scissors':
print('Scissors beats paper.')
print(two_player_player2_name + ' has lost a point.')
two_player_player2_score_points = int(two_player_player2_score) - 1
print('-------------------------------------------')
elif two_player_player2_choice.capitalize() == 'Scissors':
if two_player_player2_choice.capitalize() == two_player_rng_choice:
print(two_player_player2_name + ' did not win or lose.')
two_player_player2_score_points = two_player_player2_score + 0
print('0 points have been awarded to ' + two_player_player2_name)
print('-------------------------------------------')
elif two_player_player2_choice.capitalize() == 'Scissors' and two_player_rng_choice == 'Paper':
print('Scissors beats paper.')
print(two_player_player2_name + ' has earned a point.')
two_player_player2_score_points = int(two_player_player2_score) + 1
print('-------------------------------------------')
elif two_player_player2_choice.capitalize() == 'Scissors' and two_player_rng_choice == 'Rock':
print('Rock beats scissors.')
print(two_player_player2_name + ' has lost a point.')
two_player_player2_score_points = int(two_player_player2_score) - 1
print('-------------------------------------------')
#This is a set of print statements to display the scoreboard with the active values in the variables we used for keeping up with the player's scores.
print('The results are in:')
print('-------------------------------------------')
#Converts the variable to a string since it currently contains an integer which would cause errors.
print(two_player_player1_name + ': ' + str(two_player_player1_score_points))
print(two_player_player2_name + ': ' + str(two_player_player2_score_points))
print('-------------------------------------------')
#Establishes a while loop. Used to either restart the two-player game or terminate the program based on user input.
while True:
print('Would you like to play again? ')
two_player_start_again = input('Yes or No: ')
if two_player_start_again.capitalize() == 'Yes':
break
elif two_player_start_again.capitalize() == 'No':
print('Okay. Goodbye')
exit()
else:
print('Invalid input. Try again')
continue
continue
elif two_player_confirm.capitalize() == 'No':
print('Input the correct player count.')
print('-------------------------------------------')
continue
else:
print('Invalid input was entered. Try again.')
print('-------------------------------------------')
continue
elif player_count == '3':
print('-------------------------------------------')
print('You have chosen ' + player_count + ' ' + 'players. Is that correct? ')
three_player_confirm = input('Yes or No: ')
if three_player_confirm.capitalize() == 'Yes':
print('All players will now input what their Player Name should be.')
print('-------------------------------------------')
print('Player 1, what would you like your name to be?')
three_player_player1_name = input('Player 1 Name: ')
print(three_player_player1_name + ' ' + 'is the name you have submitted.')
print('-------------------------------------------')
print('Player 2, what would you like your name to be?')
three_player_player2_name = input('Player 2 Name: ')
print(three_player_player2_name + ' ' + 'is the name you have submitted.')
print('-------------------------------------------')
print('Player 3, what would you like your name to be?')
three_player_player3_name = input('Player 3 Name: ')
print(three_player_player3_name + ' ' + 'is the name you have submitted.')
print('-------------------------------------------')
print(three_player_player1_name + ', ' + three_player_player2_name + ', and' + three_player_player3_name + ' it is time to play Rock, Player, Scissors.')
print('-------------------------------------------')
print('None of you will be able to see your answers until all of you have submitted your choices.')
print('-------------------------------------------')
elif three_player_confirm.capitalize() == 'No':
print('Input the correct player count.')
print('-------------------------------------------')
continue
else:
print('Invalid input. Try again.')
print('-------------------------------------------')
continue
#Establishes a while loop. Used to restart a three-player game.
while True:
print(three_player_player1_name + ' get ready to make your choice. When you are ready, put your answer in below.')
print('-------------------------------------------')
three_player_player1_choice = getpass.getpass(three_player_player1_name + ' choice: ')
three_player_player2_choice = getpass.getpass(three_player_player2_name + ' choice: ')
three_player_player3_choice = getpass.getpass(three_player_player3_name + ' choice: ')
three_player_rng_choice = random.choice(['Rock', 'Paper', 'Scissors'])
print('-------------------------------------------')
print('All the choices have been submitted. Here is what was chosen: ')
print(three_player_player1_name + ' chose: ' + three_player_player1_choice.capitalize())
print(three_player_player2_name + ' chose: ' + three_player_player2_choice.capitalize())
print(three_player_player3_name + ' chose: ' + three_player_player3_choice.capitalize())
print('Finally, the game chose: ' + three_player_rng_choice)
print('-------------------------------------------')
three_player_player1_score = 0
three_player_player2_score = 0
three_player_player3_score = 0
if three_player_player1_choice.capitalize() == 'Rock':
if three_player_player1_choice.capitalize() == three_player_rng_choice:
print(three_player_player1_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player1_name)
three_player_player1_score_points = three_player_player1_score + 0
print('-------------------------------------------')
elif three_player_player1_choice.capitalize() == 'Rock' and three_player_rng_choice == 'Scissors':
print('Rock beats scissors.')
print(three_player_player1_name + ' has earned a point.')
three_player_player1_score_points = int(three_player_player1_score) + 1
print('-------------------------------------------')
elif three_player_player1_choice.capitalize() == 'Rock' and three_player_rng_choice == 'Paper':
print('Paper beats rock.')
print(three_player_player1_name + ' has lost a point.')
three_player_player1_score_points = int(three_player_player1_score) - 1
print('-------------------------------------------')
elif three_player_player1_choice.capitalize() == 'Paper':
if three_player_player1_choice.capitalize() == three_player_rng_choice:
print(three_player_player1_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player1_name)
three_player_player_score_points = three_player_player1_score + 0
print('-------------------------------------------')
elif three_player_player1_choice.capitalize() == 'Paper' and three_player_rng_choice == 'Rock':
print('Paper beats rock.')
print(three_player_player1_name + ' has earned a point.')
three_player_player1_score_points = int(three_player_player1_score) + 1
print('-------------------------------------------')
elif three_player_player1_choice.capitalize() == 'Paper' and three_player_rng_choice == 'Scissors':
print('Scissors beats paper.')
print(three_player_player1_name + ' has lost a point.')
three_player_player1_score_points = int(three_player_player1_score) - 1
print('-------------------------------------------')
elif three_player_player1_choice.capitalize() == 'Scissors':
if three_player_player1_choice.capitalize() == three_player_rng_choice:
print(three_player_player1_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player1_name)
three_player_player1_score_points = three_player_player1_score + 0
print('-------------------------------------------')
elif three_player_player1_choice.capitalize() == 'Scissors' and three_player_rng_choice == 'Paper':
print('Scissors beats paper.')
print(three_player_player1_name + ' has earned a point.')
three_player_player1_score_points = int(three_player_player1_score) + 1
print('-------------------------------------------')
elif three_player_player1_choice.capitalize() == 'Scissors' and three_player_rng_choice == 'Rock':
print('Scissors beats paper.')
print(three_player_player1_name + ' has lost a point.')
three_player_player1_score_points = int(three_player_player1_score) - 1
print('-------------------------------------------')
else:
print('An invalid input was made. Try again.')
print('-------------------------------------------')
continue
if three_player_player2_choice.capitalize() == 'Rock':
if three_player_player2_choice.capitalize() == three_player_rng_choice:
print(three_player_player2_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player2_name)
three_player_player2_score_points = three_player_player2_score + 0
print('-------------------------------------------')
elif three_player_player2_choice.capitalize() == 'Rock' and three_player_rng_choice == 'Scissors':
print('Rock beats scissors.')
print(three_player_player2_name + ' has earned a point.')
three_player_player2_score_points = int(three_player_player2_score) + 1
print('-------------------------------------------')
elif three_player_player2_choice.capitalize() == 'Rock' and three_player_rng_choice == 'Paper':
print('Paper beats rock.')
print(three_player_player2_name + ' has lost a point.')
three_player_player2_score_points = int(three_player_player2_score) - 1
print('-------------------------------------------')
elif three_player_player2_choice.capitalize() == 'Paper':
if three_player_player2_choice.capitalize() == three_player_rng_choice:
print(three_player_player2_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player2_name)
three_player_player2_score_points = three_player_player2_score + 0
print('-------------------------------------------')
elif three_player_player2_choice.capitalize() == 'Paper' and three_player_rng_choice == 'Rock':
print('Paper beats rock.')
print(three_player_player2_name + ' has earned a point.')
three_player_player2_score_points = int(three_player_player2_score) + 1
print('-------------------------------------------')
elif three_player_player2_choice.capitalize() == 'Paper' and three_player_rng_choice == 'Scissors':
print('Scissors beats paper.')
print(three_player_player3_name + ' has lost a point.')
three_player_player3_score_points = int(three_player_player3_score) - 1
print('-------------------------------------------')
elif three_player_player2_choice.capitalize() == 'Scissors':
if three_player_player2_choice.capitalize() == three_player_rng_choice:
print(three_player_player2_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player2_name)
three_player_player2_score_points = three_player_player2_score + 0
print('-------------------------------------------')
elif three_player_player2_choice.capitalize() == 'Scissors' and three_player_rng_choice == 'Paper':
print('Scissors beats paper.')
print(three_player_player2_name + ' has earned a point.')
three_player_player2_score_points = int(three_player_player2_score) + 1
print('-------------------------------------------')
elif three_player_player2_choice.capitalize() == 'Scissors' and three_player_rng_choice == 'Rock':
print('Rock beats scissors.')
print(three_player_player2_name + ' has lost a point.')
three_player_player2_score_points = int(three_player_player2_score) - 1
print('-------------------------------------------')
else:
print('An invalid input was made. Try again.')
print('-------------------------------------------')
continue
if three_player_player3_choice.capitalize() == 'Rock':
if three_player_player3_choice.capitalize() == three_player_rng_choice:
print(three_player_player3_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player3_name)
three_player_player3_score_points = three_player_player3_score + 0
print('-------------------------------------------')
elif three_player_player3_choice.capitalize() == 'Rock' and three_player_rng_choice == 'Scissors':
print('Rock beats scissors.')
print(three_player_player3_name + ' has earned a point.')
three_player_player3_score_points = int(three_player_player3_score) + 1
print('-------------------------------------------')
elif three_player_player3_choice.capitalize() == 'Rock' and three_player_rng_choice == 'Paper':
print('Paper beats rock.')
print(three_player_player3_name + ' has lost a point.')
three_player_player3_score_points = int(three_player_player3_score) - 1
print('-------------------------------------------')
elif three_player_player3_choice.capitalize() == 'Paper':
if three_player_player3_choice.capitalize() == three_player_rng_choice:
print(three_player_player3_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player3_name)
three_player_player3_score_points = three_player_player3_score + 0
print('-------------------------------------------')
elif three_player_player3_choice.capitalize() == 'Paper' and three_player_rng_choice == 'Rock':
print('Paper beats rock.')
print(three_player_player3_name + ' has earned a point.')
three_player_player3_score_points = int(three_player_player3_score) + 1
print('-------------------------------------------')
elif three_player_player3_choice.capitalize() == 'Paper' and three_player_rng_choice == 'Scissors':
print('Scissors beats paper.')
print(three_player_player3_name + ' has lost a point.')
three_player_player3_score_points = int(three_player_player3_score) - 1
print('-------------------------------------------')
elif three_player_player3_choice.capitalize() == 'Scissors':
if three_player_player3_choice.capitalize() == three_player_rng_choice:
print(three_player_player3_name + ' did not win or lose.')
print('0 points have been awarded to ' + three_player_player3_name)
three_player_player3_score_points = three_player_player3_score + 0
print('-------------------------------------------')
elif three_player_player3_choice.capitalize() == 'Scissors' and three_player_rng_choice == 'Paper':
print('Scissors beats paper.')
print(three_player_player3_name + ' has earned a point.')
three_player_player3_score_points = int(three_player_player3_score) + 1
print('-------------------------------------------')
elif three_player_player3_choice.capitalize() == 'Scissors' and three_player_rng_choice == 'Rock':
print('Rock beats scissors.')
print(three_player_player3_name + ' has lost a point.')
three_player_player3_score_points = int(three_player_player3_score) - 1
print('-------------------------------------------')
else:
print('An invalid input was made. Try again.')
print('-------------------------------------------')
continue
print('The results are in:')
print('-------------------------------------------')
print(three_player_player1_name + ': ' + str(three_player_player1_score_points))
print(three_player_player2_name + ': ' + str(three_player_player2_score_points))
print(three_player_player3_name + ': ' + str(three_player_player3_score_points))
while True:
print('Would you like to play again? ')
three_player_start_again = input('Yes or No: ')
if three_player_start_again.capitalize() == 'Yes':
break
elif three_player_start_again.capitalize() == 'No':
print('Okay. Goodbye')
exit()
else:
print('Invalid input. Try again')
print('-------------------------------------------')
continue
continue
else:
print('Make sure to enter a maximum of 3 total players.')
print('-------------------------------------------')
continue
elif start_game.capitalize() == 'No':
print('Okay. Goodbye now.')
#Stops executing the current while loop and moves on to any code left outside of that loop.
break
else:
print('Invalid input. Try again.')
print('-------------------------------------------')
continue