# SNㅤake fullscreen 1920,1020
import pygame
import random

B = (0, 0, 0)
P = (102, 0, 255)
W = (255, 255, 255)

FPS = 60
WIDTH, HIGHT = 680,480
pygame.init()
pygame.mixer.init()
screen = pygame.display.set_mode((WIDTH, HIGHT))
pygame.display.set_caption("pygameㅤwindow")
snake_block = 10
snake_speed = 15
clock = pygame.time.Clock()


class Snake(pygame.sprite.Sprite):
    def __init__(self):
        super().__init__()
        self.image = pygame.Surfce((snake_block, snake_block))
        self.image.fill(B)
        self.rect = self.image.get_rect()
        self.rect.x = 400
        self.rect.y = 300
        self.dx = 0
        self.dy = 0
        self.body = []
        self.lenght = 1
        self.score = 0

    def update(self):
        self.rect.x += self.dx
        self.rect.y += self.dy

        self.body.append(self.rect.x, self.rect.y)
        if len(self.body) > self.length:
            del self.body[0]

        for segment in self.body[:-1]:
            if segment[0] == self.rect.x and segment[1] == self.rect.y:
                return True
            return False
    def draw_body(self, surface):
        for segment in self.body[:-1]:
            pygame.draw.rect(surface, B, [segment[0],segment[1],snake_block, snake_block])

    def grow(self):
        self.length += 1
        self.score += 1

class Food(pygame.sprite.Sprite):
    def __init__(self):
        super().__init__()
        self.image = pygame.Surface((snake_block,snake_block))
        self.image.fill(P)
        self.rect = self.image.get_rect()
        self.respawn

    def respawn(self):
        self.rect.x = random.randrange(0,800 - snake_block, snake,block)
        self.rect.y = random.randrange(0,600 - snake_block, snake, block)
running = True
while running:
    clock.tick(FPS)
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
    Z = random.randint(000, 000)
    X = random.randint(000, 000)
    C = random.randint(000, 000)


    screen.fill((Z, X, C))
    pygame.display.flip()
pygame.quit()