  # Trust game ## No description

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
```
```def botpick():
return randint(1, 5)
def botcoin(a):
if a==1:
return 0
elif a==2:
return 1
elif a==3:
return playr1
elif a==4:
if grudge_start==True:
return 0
else:
return 1
elif a==5:
if playnumb==1 or playnumb==3 or playnumb==4:
return 1
elif playnumb==2:
return 0
if grudge_start==True:
a=3
return 1
elif playnumb==5 and grudge_start==False:
a=1
print("welcome to my 'trust' game!\nIn this game, one person will input a 0(not put in a coin) or a 1(put in a coin).\nif you  put in a coin, the other person will get 2, but you will loose one.\nyou start with one. \nwould you like to play with a human or a random CPU I made?\n(1=yes 0=no)")
bot = int(input())
print("Ok! lets go!")
coin1=1
coin2=1
playnumb=0
play=True
grudge_start=False
playr1=1
botnumb=str("you shouldn't see this")
while play==True:
playnumb=playnumb+1
playr1 = int(input())
print("d\no\nn\nt\n\nc\nh\ne\na\nt\n")
print("d\no\nn\nt\n\nc\nh\ne\na\nt\n")
print("d\no\nn\nt\n\nc\nh\ne\na\nt\n")
print("d\no\nn\nt\n\nc\nh\ne\na\nt\n")
if bot==0:
playr2 = int(input())
elif bot==1:
playr2=botcoin(botpick())
if playr1==1:
coin2=coin2+2
coin1=coin1-1
print("player 1 was nice and gave player 2 2 coins but it costed 1 coin")
else:
print("player 1 was a jerk and did NOTHING")
grudge_start==True
if playr2==1:
coin1=coin1+2
coin2=coin2-1
print("player 2 was nice and gave player 1 2 coins but it costed 1 coin")
else:
print("player 2 was a jerk and did NOTHING")
print("player 1 got",coin1)
print("player 2 got",coin2)
print("wanna play again?(1 yes 0 no)")
play = int(input())
if play==True:
print("great! your score has kept and it will be the same rules. player 1, go ahead!")
else:
print("Ok bye!")
if botnumb==1:
bottype="always cheat"
elif botnumb==2:
bottype="always spare"
elif botnumb==3:
bottype="copycat"
elif botnumb==4:
bottype="grudger"
else:
bottype="sherlock"
if bot==1:
print("Oh! and you had "+ str(bottype))
exit()```