Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Entity(object):
- def __init__(self, x, y, char, color, name, entity_type, always_visible=False, blocks=False):
- self.__x = x
- self.__y = y
- self.__char = char
- self.__color = color
- self.__name = name
- self.__entity_type = entity_type
- self.__always_visible = always_visible
- self.__blocks = blocks
- class Actor(Entity):
- def __init__(self, x, y, char, color, name, entity_type, hp, ai=None, always_visible=False, blocks=False):
- super(Actor, self).__init__(x, y, char, color, name, entity_type, always_visible, blocks)
- self.__hp = hp
- self.__ai = ai
- player = Actor(1, 1, '@', "red", "player", "player", 100, blocks=True)
- print player.__x
- print player.__y
- print player.__char
- print player.__color
- print player.__name
- print player.__entity_type
- print player.__hp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement