comparison gamelib/animal.py @ 477:c1439f6705a2

Start of fix for save/restore after animals gained gameboards.
author Simon Cross <hodgestar@gmail.com>
date Wed, 25 Nov 2009 18:44:23 +0000
parents 3dae0fc14009
children 3ed6c011106d
comparison
equal deleted inserted replaced
476:3dae0fc14009 477:c1439f6705a2
28 'pos', 28 'pos',
29 'equipment', 29 'equipment',
30 'accoutrements', 30 'accoutrements',
31 'abode', 31 'abode',
32 'facing', 32 'facing',
33 'gameboard',
33 ] 34 ]
34 35
35 def __init__(self, tile_pos, gameboard): 36 def __init__(self, tile_pos, gameboard):
36 # load images 37 # load images
37 self._image_left = imagecache.load_image(self.IMAGE_FILE) 38 self._image_left = imagecache.load_image(self.IMAGE_FILE)
50 self.facing = 'left' 51 self.facing = 'left'
51 self.gameboard = gameboard 52 self.gameboard = gameboard
52 53
53 def make(cls): 54 def make(cls):
54 """Override default Simplifiable object creation.""" 55 """Override default Simplifiable object creation."""
55 return cls((0, 0)) 56 return cls((0, 0), None)
56 make = classmethod(make) 57 make = classmethod(make)
57 58
58 def unsimplify(cls, *args, **kwargs): 59 def unsimplify(cls, *args, **kwargs):
59 """Override default Simplifiable unsimplification.""" 60 """Override default Simplifiable unsimplification."""
60 obj = super(Animal, cls).unsimplify(*args, **kwargs) 61 obj = super(Animal, cls).unsimplify(*args, **kwargs)