Skip to content

Commit bb19f5c

Browse files
committed
Changed collission detection to be Pythonic
1 parent d207cb2 commit bb19f5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arcade-a-primer/arcade_game.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def on_update(self, delta_time: float):
210210
return
211211

212212
# Did we hit anything? If so, end the game
213-
if len(self.player.collides_with_list(self.enemies_list)) > 0:
213+
if self.player.collides_with_list(self.enemies_list):
214214
self.collided = True
215215
self.collision_timer = 0.0
216216
arcade.play_sound(self.collision_sound)

0 commit comments

Comments
 (0)