Mercurial > rinkhals
diff gamelib/animal.py @ 505:3ed6c011106d
Switch to classmethod decorators.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Thu, 26 Nov 2009 22:34:58 +0000 |
parents | c1439f6705a2 |
children | d3ceb9e9c48e |
line wrap: on
line diff
--- a/gamelib/animal.py Thu Nov 26 22:28:22 2009 +0000 +++ b/gamelib/animal.py Thu Nov 26 22:34:58 2009 +0000 @@ -51,17 +51,17 @@ self.facing = 'left' self.gameboard = gameboard + @classmethod def make(cls): """Override default Simplifiable object creation.""" return cls((0, 0), None) - make = classmethod(make) + @classmethod def unsimplify(cls, *args, **kwargs): """Override default Simplifiable unsimplification.""" obj = super(Animal, cls).unsimplify(*args, **kwargs) obj.redraw() return obj - unsimplify = classmethod(unsimplify) def loop(self, tv, _sprite): ppos = tv.tile_to_view(self.pos.to_tile_tuple())