# data[].attributes.attachment_link.readable_text
## find this code
# import pygame
# from pygame import*
# pygame.init()

# GAME_WINDOW = display.set_mode((900, 400))
# display.set_caption('Attack of the Vampire Pizzas!')

## add this code below
game_running = True
while game_running:
    
    for event in pygame.event.get():
        if event.type == QUIT:
            game_running = False
            
    display.update()
    
pygame.quit()

# data[].attributes.attachment_link.readable_text
import pygame
from pygame import *
pygame.init()

## remove this code
# WINDOW_WIDTH = 900
# WINDOW_HEIGHT = 400

## add this code
# WINDOW_WIDTH = 1100
# WINDOW_HEIGHT = 600

WINDOW_RES = (WINDOW_WIDTH, WINDOW_HEIGHT)

GAME_WINDOW = display.set_mode(WINDOW_RES)
display.set_caption('Attack of the Vampire Pizzas!')

## add this code
# background_img = image.load('restaurant.jpg')
# background_surf = Surface.convert_alpha(background_img)
# BACKGROUND = transform.scale(background_surf, WINDOW_RES)

## add this code
# pizza_img = image.load('vampire.png')
# pizza_surf = Surface.convert_alpha(pizza_img)
# VAMPIRE_PIZZA = transform.scale(pizza_surf, (100, 100))

## add this code
# GAME_WINDOW.blit(BACKGROUND, (0, 0))
# GAME_WINDOW.blit(VAMPIRE_PIZZA, (900, 400))

game_running = True
while game_running:
    
    for event in pygame.event.get():
        if event.type == QUIT:
            game_running = False
            
    display.update()
    
pygame.quit()

# data[].attributes.attachment_link.readable_text
import pygame
from pygame import *
## add this code
#from random import randint
pygame.init()

WINDOW_WIDTH = 1100
WINDOW_HEIGHT = 600
WINDOW_RES = (WINDOW_WIDTH, WINDOW_HEIGHT)

WIDTH = 100
HEIGHT = 100

WHITE = (255, 255, 255)

## add this code
# SPAWN_RATE = 360

GAME_WINDOW = display.set_mode(WINDOW_RES)
display.set_caption('Attack of the Vampire Pizzas!')

background_img = image.load('restaurant.jpg')
background_surf = Surface.convert_alpha(background_img)
BACKGROUND = transform.scale(background_surf, WINDOW_RES)

pizza_img = image.load('vampire.png')
pizza_surf = Surface.convert_alpha(pizza_img)
VAMPIRE_PIZZA = transform.scale(pizza_surf, (WIDTH, HEIGHT))

## add this code
# class VampireSprite(sprite.Sprite):
#     def __init__(self):
#         super().__init__()
#         self.speed = 2
#         self.lane = randint(0, 4)
#         all_vampires.add(self)
#         self.image = VAMPIRE_PIZZA.copy()
#         y = 50 + self.lane * 100
#         self.rect = self.image.get_rect(center = (1100, y))

#     def update(self, game_window):
#         game_window.blit(self.image, (self.rect.x, self.rect.y))
        
# all_vampires = sprite.Group()

tile_color = WHITE
for row in range(6):
    for column in range(11):
        draw.rect(BACKGROUND, tile_color, (WIDTH*column, HEIGHT*row, WIDTH, HEIGHT), 1)

GAME_WINDOW.blit(BACKGROUND, (0, 0))
## remove this code
# GAME_WINDOW.blit(VAMPIRE_PIZZA, (900, 400))

game_running = True
while game_running:
    
    for event in pygame.event.get():
        if event.type == QUIT:
            game_running = False

## add this code
    # if randint(1, SPAWN_RATE) == 1:
    #     VampireSprite()

    # for vampire in all_vampires:
    #     vampire.update(GAME_WINDOW)
            
    display.update()
    
pygame.quit()

# data[].attributes.attachment_link.readable_text
import pygame
from pygame import *
pygame.init()

WINDOW_WIDTH = 1100
WINDOW_HEIGHT = 600
WINDOW_RES = (WINDOW_WIDTH, WINDOW_HEIGHT)

## add this code
# WIDTH = 100
# HEIGHT = 100

WHITE = (255, 255, 255)

GAME_WINDOW = display.set_mode(WINDOW_RES)
display.set_caption('Attack of the Vampire Pizzas!')

background_img = image.load('restaurant.jpg')
background_surf = Surface.convert_alpha(background_img)
BACKGROUND = transform.scale(background_surf, WINDOW_RES)

pizza_img = image.load('vampire.png')
pizza_surf = Surface.convert_alpha(pizza_img)
## remove this code
# VAMPIRE_PIZZA = transform.scale(pizza_surf, (100, 100))

## add this code
# VAMPIRE_PIZZA = transform.scale(pizza_surf, (WIDTH, HEIGHT))

## add this code
# tile_color = WHITE
# for row in range(6):
#     for column in range(11):
#         draw.rect(BACKGROUND, tile_color, (WIDTH*column, HEIGHT*row, WIDTH, HEIGHT), 1)

GAME_WINDOW.blit(BACKGROUND, (0, 0))
GAME_WINDOW.blit(VAMPIRE_PIZZA, (900, 400))

game_running = True
while game_running:
    
    for event in pygame.event.get():
        if event.type == QUIT:
            game_running = False
            
    display.update()
    
pygame.quit()