forked from drsudhanshupanda/Software
-
Notifications
You must be signed in to change notification settings - Fork 0
/
enemies.py
28 lines (22 loc) · 875 Bytes
/
enemies.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
#Enemy
class Enemy(object):
"""base class for all enemies"""
def __init__(self, name, lifepoints, damage):
self.name = name
self.lifepoints = lifepoints
self.damage = damage
def is_alive(self):
return self.lifepoints > 0
class Guilt(Enemy):
def __init__(self):
super(Guilt, self).__init__(name="Guilt", lifepoints = 10, damage = 2)
class Homework(Enemy):
def __init__(self):
super(Homework, self).__init__(name="Homework assignment", lifepoints=100, damage=2)
class ResearchPaper(Enemy):
def __init__(self):
super(ResearchPaper, self).__init__(name="Research Paper", lifepoints=30, damage=10)
#boss
class Procrastination(Enemy):
def __init__(self):
super(Procrastination, self).__init__(name="Procrastination", lifepoints=80, damage=15)