Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fight():
- #coin toss method for head_or_tails
- def coin():
- head_or_tails = null
- coin = randint(1,2)
- return coin
- if coin > 1:
- head_or_tails = 'H'
- else:
- head_or_tails = 'T'
- #Infinite loop for initiative results + main fight protocol
- while True:
- print("Flipping a coin for Initiative...")
- c1 = coin()
- print("Do you want to call heads or tails?")
- next = input("... :")
- if ('head' in next and head_or_tails = 'H') or (next == 'h' and head_or_tails = 'H'):
- print("Heads! Good call! You go first.")
- choose()
- #The syntax works however, as you can see it is quite complicated...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement