From aaa8898c0c3a0b915325653ffb9e9398ff37d9b2 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 10 Sep 2016 23:19:35 +0200 Subject: [PATCH] Deal with unserialized list positions --- tabakrolletjie/turnip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.34.1