forked from s434673/AI_Waiter
Initialize basic board
This commit is contained in:
parent
883422a3f7
commit
6a034ee8d7
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
bin
|
||||||
|
venv
|
||||||
|
.venv
|
28
src/main.py
Normal file
28
src/main.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import sys
|
||||||
|
import pygame
|
||||||
|
|
||||||
|
pygame.init()
|
||||||
|
screen = pygame.display.set_mode((960, 720))
|
||||||
|
done = False
|
||||||
|
block_size = 60
|
||||||
|
WHITE = (255, 255, 255)
|
||||||
|
BLUE = (0, 0, 255)
|
||||||
|
screen.fill(WHITE)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
for y in range(400):
|
||||||
|
for x in range(300):
|
||||||
|
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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user