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: 
Add an attribute collide to the your "Enemy" class:

```py
class Enemy(pygame.sprite.Sprite):
    def __init__(self, ...):
        # [...]

        self.collide = False

```

Implement the following logic:

* If an enemy collides with the player and `self.collide` is set, do nothing.
* If an enemy collides with the player and `self.collide` is not set, set `self.collide = True` and decrement `life`.
* If an enemy does not collide with the player, set `self.collide = False`.

```py
while run:
    # [...]

    for enemy in enemies:

        if player.rect.colliderect(enemy.rect):

            # If an enemy collides with the player and `self.collide` is set, do nothing.
            if not self.collide:
                # If an enemy collides with the player and `self.collide` is not set, 
                # set `self.collide = True` and decrement `life`.
                self.collide = True
                life -= 1

        else:
            # If an enemy does not collide with the player, set `self.collide = False`.
            self.collide = False

```

This logic means that `live` is only decremented when the enemy hits the player for the first time. The enemy must leave the player's area for a collision to be counted again.
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

```