-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (21 loc) · 824 Bytes
/
main.py
File metadata and controls
28 lines (21 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from generator import generate
import pygame, images
wn_width, wn_height = 750, 750
window = pygame.display.set_mode((wn_width, wn_height))
def draw_images(images, size):
for i in range(15):
for j in range(15):
img = pygame.transform.scale(images[i*15 + j], size)
window.blit(img, (j*(wn_width/15), i*(wn_height/15)))
pygame.display.update()
draw_images(images.bg_pygame, (50, 50))
draw_images(generate(images.rand_pygame, 110), (50, 50))
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_n:
draw_images(images.bg_pygame, (50, 50))
draw_images(generate(images.rand_pygame, 110), (50, 50))