# HG changeset patch # User Emmanuel Gil Peyrot # Date 1428516792 -7200 # Node ID 3168e5ff22dcb3c504baa51ffd6d3a7a8f79a8fe # Parent dd393fa6e98869e4a6c41c9342c9e45eb42f0d6b Cast things closer to their usage, in Item. diff --git a/pytouhou/game/item.pyx b/pytouhou/game/item.pyx --- a/pytouhou/game/item.pyx +++ b/pytouhou/game/item.pyx @@ -81,8 +81,6 @@ cdef class Item(Element): cdef bint on_collect(self, Player player) except True: - cdef long level, poc - if not (self.player is None or self.player is player): return False @@ -123,13 +121,13 @@ cdef class Item(Element): elif self._type == 1: # point player.points += 1 - poc = player.sht.point_of_collection + poc = player.sht.point_of_collection if player.y < poc: score = 100000 self._game.modify_difficulty(+30) color = 'yellow' else: - score = (728 - int(self.y)) * 100 #TODO: check the formula some more. + score = (728 - (self.y)) * 100 #TODO: check the formula some more. self._game.modify_difficulty(+3) elif self._type == 3: # bomb