-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame_cheat.py
More file actions
59 lines (50 loc) · 1.43 KB
/
Copy pathgame_cheat.py
File metadata and controls
59 lines (50 loc) · 1.43 KB
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
import random
print("Number of rounds you want to play :")
rounds = int(input())
draw_rounds = 0
p_point = 0
c_point = 0
while (rounds>0):
cpu_moves = ["Snake", "Water" , "Gun"]
cpu_choice = random.choice(cpu_moves)
print("\nEnter player choice : ")
player_choice = input()
print("cpu choice :", cpu_choice)
if player_choice == "Snake":
if cpu_choice == "Snake":
print("Draw")
draw_rounds += 1
elif cpu_choice == "Water":
print("Win")
p_point +=1
else :
print("Lose")
c_point += 1
elif player_choice == "Water":
if cpu_choice == "Snake":
print("Lose")
c_point += 1
elif cpu_choice == "Water":
print("Draw")
draw_rounds += 1
else :
print("Win")
p_point += 1
else:
if cpu_choice == "Gun":
print("Draw")
draw_rounds += 1
elif cpu_choice == "Water":
print("Lose")
c_point += 1
else:
print("Win")
p_point += 1
rounds -= 1
print("\nTotal Score at the end of rounds")
print("\nNo. of rounds draw between cpu and player :")
print(f"{draw_rounds} rounds")
print("\nNo. of rounds player won:")
print(f"{p_point} rounds")
print("\nNo. of rounds cpu won :")
print(f"{c_point} rounds")