Male_zoo_Projekt_SI/draw.py

14 lines
568 B
Python
Raw Normal View History

import pygame
def draw_goal(const, goal):
x, y = goal
rect = (x * const.GRID_SIZE, y * const.GRID_SIZE, const.GRID_SIZE, const.GRID_SIZE)
pygame.draw.rect(const.screen, const.RED, rect)
pygame.display.flip()
pygame.time.delay(2000)
def draw_grid(const):
for y in range(0, const.GRID_HEIGHT * const.GRID_SIZE, const.GRID_SIZE):
for x in range(0, const.GRID_WIDTH * const.GRID_SIZE, const.GRID_SIZE):
rect = pygame.Rect(x, y, const.GRID_SIZE, const.GRID_SIZE)
pygame.draw.rect(const.screen, const.BLACK, rect, 1)