-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrps.py
More file actions
62 lines (51 loc) · 1.15 KB
/
Copy pathrps.py
File metadata and controls
62 lines (51 loc) · 1.15 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
60
61
62
import random
def play(move):
rock = "Rock"
paper = "Paper"
scissors = "Scissors"
if move == 'rock':
move = rock
elif move == 'paper':
move = paper
elif move == 'scissors':
move = scissors
hand = [rock, paper, scissors]
com_pick = random.choice(hand)
if move == rock:
if com_pick == rock:
match = "draw"
if com_pick == paper:
match = "lose"
if com_pick == scissors:
match = "win"
if move == paper:
if com_pick == rock:
match = "win"
if com_pick == paper:
match = "draw"
if com_pick == scissors:
match = "lose"
if move == scissors:
if com_pick == rock:
match = "lose"
if com_pick == paper:
match = "win"
if com_pick == scissors:
match = "draw"
print(move, com_pick)
return match
# print(play('scissors'))
wizard = "Wizard"
wizard_hp = 70
wizard_dmg = 150
human = "Human"
human_hp = 150
human_dmg = 20
elf = "Elf"
elf_hp = 100
elf_dmg = 100
orc = "Orc"
orc_hp = 170
orc_dmg = 70
dragon_hp = 300
dragon_dmg = 50