Question: i create file in public folder and try to include blade file

```
<?php include('../resources/views/template/header.blade.php'); ?>

```

its not working fine, css not render at this point.
Can anyone help me with this

Answer: 
You should include the whole `while` loop for a proper answer. But in general to escape a loop on a certain condition you can use `break` statement. Like so:

```py
if player.rect.colliderect(enemy.rect):
    life -= 1
    break

```
I think the root of your problem is that the while loop loops multiple times while a single "collision" is taking place. In that case, you could consider adding another attribute that allows only one life decrease per collision.

Add an attribute to the enemy class. For this example, lets call it `player_collided`.

Then your collision check could be updated to:

```
while ...:
  ...

  if player.rect.colliderect(enemy.rect) and not enemy.player_collided:
    life -= 1
    enemy.player_collided = True
  else:
    enemy.player_collided = False

```