windows 10
python 3.7.3
Заранее спасибо за ответ!
python 3.7.3
Python:
import pygame as pg
pg.init()
clock = pg.time.Clock()
FPS = 10
WINDOW_SIZE = (700, 700)
BACKGROUND = (150, 90, 30)
BLACK = (0, 0, 0)
WHITE = (225, 225, 225)
GREY = (180, 180, 180)
YELLOW = (255, 255, 0)
CELL_QTY = 8
CELL_SIZE = 80
COLORS = [BLACK, GREY]
screen = pg.display.set_mode(WINDOW_SIZE)
# Init and draw some content and enviroment
screen.fill(BACKGROUND)
for y in range(CELL_QTY):
for x in range(CELL_QTY):
pg.draw.rect (screen,(x*CELL_SIZE, y*CELL_SIZE, CELL_SIZE, CELL_SIZE))
pg.display.update()
run = True
while run:
for event in pg.event.get():
if event.type == pg.QUIT:
pg.quit()
run = False
# other events handlares
clock.tick(FPS)