forked from s474139/Inteligentny_Wozek
adding window with grid
This commit is contained in:
commit
1b990a81d5
19
main.py
Normal file
19
main.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import pygame
|
||||||
|
import sys
|
||||||
|
|
||||||
|
pygame.init()
|
||||||
|
screen = pygame.display.set_mode((1280, 720))
|
||||||
|
|
||||||
|
c = (0, 150, 0)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
for event in pygame.event.get():
|
||||||
|
if event.type == pygame.QUIT:
|
||||||
|
sys.exit(0)
|
||||||
|
elif event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE:
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
for x in range(0, 1280, 80):
|
||||||
|
pygame.draw.line(screen, c, (1, x), (1280, x), 2)
|
||||||
|
pygame.draw.line(screen, c, (x, 1), (x, 720), 2)
|
||||||
|
pygame.display.update()
|
Loading…
Reference in New Issue
Block a user