+ 3
I wrote this for you:
https://code.sololearn.com/c8gS0Mug0O0Y/?ref=app
+ 2
I'm starting to go a bit overboard with mine :D finished maxhp buff, potion and damage/armor additions :D I think I'll add the hp thing i made .D
max_hp = 100
current_hp = 60
def healthbar(max_hp, current_hp, *args):
base = "[||||||||||]"
calc = int(((max_hp - current_hp) / 10))
if calc != 0:
print(base[0:-calc], end="")
print(" "*(len(base)-len(base[0:-calc])), end="")
print("]")
else:
print(base)
print(current_hp)
healthbar(max_hp, current_hp)
0
Markus Kaleton Great to see an alternative solution âș