Skip to content

Instantly share code, notes, and snippets.

@chrishwiggins
Created April 3, 2016 22:41
Show Gist options
  • Save chrishwiggins/023d003c2e6795dfb840865e92397bfb to your computer and use it in GitHub Desktop.
Save chrishwiggins/023d003c2e6795dfb840865e92397bfb to your computer and use it in GitHub Desktop.
import sys
import random
u_Health = 10
t_Health = 10
while u_Health*t_Health > 0:
they_attack=random.randint(0,1)
if they_attack == 0:
print ("they attack!")
u_Health=u_Health-1
#print (u_Health,t_Health)
else:
print ("I attack!")
t_Health=t_Health-1
#print (u_Health,t_Health)
if u_Health == 0:
print("you DIED yo")
else:
print("they DIED yo")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment