2020-03-23 20:55:52 +01:00
|
|
|
import sys
|
|
|
|
import pygame
|
|
|
|
|
|
|
|
pygame.init()
|
2020-04-02 20:37:21 +02:00
|
|
|
screen = pygame.display.set_mode((700, 750))
|
2020-03-23 20:55:52 +01:00
|
|
|
done = False
|
2020-04-02 20:37:21 +02:00
|
|
|
block_size = 50
|
2020-03-23 20:55:52 +01:00
|
|
|
WHITE = (255, 255, 255)
|
|
|
|
BLUE = (0, 0, 255)
|
|
|
|
screen.fill(WHITE)
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2020-04-02 20:37:21 +02:00
|
|
|
for y in range(15):
|
|
|
|
for x in range(14):
|
2020-03-23 20:55:52 +01:00
|
|
|
rect = pygame.Rect(x * block_size, y * block_size, block_size - 1, block_size - 1)
|
|
|
|
pygame.draw.rect(screen, BLUE, rect)
|
|
|
|
|
|
|
|
while not done:
|
|
|
|
for event in pygame.event.get():
|
|
|
|
if event.type == pygame.QUIT:
|
|
|
|
pygame.quit()
|
|
|
|
sys.exit()
|
|
|
|
pygame.display.update()
|
|
|
|
|
|
|
|
|
|
|
|
main()
|
|
|
|
|