From: Neil Date: Sat, 10 Sep 2016 21:19:35 +0000 (+0200) Subject: Deal with unserialized list positions X-Git-Tag: tabakrolletjie-v1.0.0~35^2~2 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=aaa8898c0c3a0b915325653ffb9e9398ff37d9b2;p=tabakrolletjie.git Deal with unserialized list positions --- diff --git a/tabakrolletjie/turnip.py b/tabakrolletjie/turnip.py index b67196a..b1bb5a4 100644 --- a/tabakrolletjie/turnip.py +++ b/tabakrolletjie/turnip.py @@ -24,7 +24,7 @@ class Turnip(object): self._age = kwargs.get('age', 0) self._pos = kwargs.get('pos', (0, 0)) space = kwargs.get('space', None) - self._rotation = 90 * (hash(self._pos) % 4) + self._rotation = 90 * (hash(tuple(self._pos)) % 4) self._update_image() self.eaten = False # Flag for boyd self._body = pymunk.Body(0, 0, pymunk.Body.STATIC)