Skip to content

Commit 0c234dc

Browse files
committed
optimized
1 parent 452c8d1 commit 0c234dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/aliens_game/aliens_game.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def game_loop(screen: pygame.Surface, background: pygame.Surface, images: List[p
223223

224224
if aliens_list and random() < BOMB_INSTANTIATION_PROBABILITY:
225225
last_alien_rect = aliens_list[-1]["GraphicComponent"].rect
226-
if last_alien_rect.left > 0 and last_alien_rect.right < right_edge:
226+
if 0 < last_alien_rect.left and last_alien_rect.right < right_edge:
227227
bomb_initial_x, bomb_initial_y = last_alien_rect.move(BOMB_OFFSET[0], BOMB_OFFSET[1]).midbottom
228228
bomb_factory(bomb_initial_x, bomb_initial_y)
229229
bombs_list = list(entities_manager.get_all_entities_of_group("bombs"))

0 commit comments

Comments
 (0)