comparison pytouhou/game/game.py @ 259:3631abb6e95b

Minor performance improvement.
author Thibaut Girka <thib@sitedethib.com>
date Sun, 22 Jan 2012 22:08:36 +0100
parents 620134bc51f4
children f037bca24f2d
comparison
equal deleted inserted replaced
258:620134bc51f4 259:3631abb6e95b
269 self.bullets = [bullet for bullet in self.bullets 269 self.bullets = [bullet for bullet in self.bullets
270 if not bullet._removed] 270 if not bullet._removed]
271 self.players_bullets = [bullet for bullet in self.players_bullets 271 self.players_bullets = [bullet for bullet in self.players_bullets
272 if not bullet._removed] 272 if not bullet._removed]
273 self.cancelled_bullets = [bullet for bullet in self.cancelled_bullets 273 self.cancelled_bullets = [bullet for bullet in self.cancelled_bullets
274 if bullet.is_visible(self.width, self.height)] 274 if not bullet._removed]
275 275
276 # Filter out-of-scren items 276 # Filter out-of-scren items
277 items = [] 277 items = []
278 for item in self.items: 278 for item in self.items:
279 if item.y < 448: 279 if item.y < 448: