diff pytouhou/game/game.py @ 479:1de67f332f00

Fix several synchro issues
author Thibaut Girka <thib@sitedethib.com>
date Wed, 28 Dec 2011 19:42:48 +0100
parents 9d4d52793eca
children
line wrap: on
line diff
--- a/pytouhou/game/game.py
+++ b/pytouhou/game/game.py
@@ -95,7 +95,6 @@ class Game(object):
 
 
     def drop_bonus(self, x, y, _type, end_pos=None):
-        player = self.players[0] #TODO
         if _type > 6:
             return
         item_type = self.item_types[_type]
@@ -110,7 +109,7 @@ class Game(object):
 
 
     def change_bullets_into_star_items(self):
-        player = self.players[0] #TODO
+        player = min(self.players, key=lambda x: (x.state.score, x.state.character)) #TODO
         item_type = self.item_types[6]
         self.items.extend(Item((bullet.x, bullet.y), 6, item_type, self, player=player) for bullet in self.bullets)
         self.bullets = []