X-Git-Url: https://harishankar.org/repos/?p=butaba-adventures.git;a=blobdiff_plain;f=butaba.py;h=d9237ca62efd35907e18ead34a383ad0b029829d;hp=7b939804ffcf7e132c879db97a7e0e91b57182e6;hb=667ea7c15261100aae75b61de8664863b58f01e4;hpb=6552a4a3522d0b48177a9c2ebedda92b824874f7 diff --git a/butaba.py b/butaba.py index 7b93980..d9237ca 100644 --- a/butaba.py +++ b/butaba.py @@ -1,17 +1,18 @@ # Main player Butaba class +import constants + class Butaba: - # Position definitions - LEFT = 0 - RIGHT = 1 - FRONT = 2 - BACK = 3 - MAXITEMS = 8 - MAXHEALTH = 100 # initialize our character - def __init__ (self, startrow, startcol, position=LEFT, health=100, magic=1, experience=1, strength=1, gold=0, inventory = []): + def __init__ (self, startrow, startcol, imageleft, imageright, imagefront, imageback, portrait, + position=constants.LEFT, health=100, magic=1, experience=1, strength=1, gold=0, inventory = []): self.position = position + self.imageleft = imageleft + self.imageright = imageright + self.imagefront = imagefront + self.imageback = imageback + self.portrait = portrait self.row = startrow self.col = startcol self.magic = magic @@ -20,4 +21,3 @@ class Butaba: self.health = health self.objects = inventory self.gold = gold -