Compare commits
No commits in common. "7cdfd133b10f25da8141b227137ac5120e505e4a" and "a1ced31807b478efc507294005f9e980299f2104" have entirely different histories.
7cdfd133b1
...
a1ced31807
16
main.py
16
main.py
@ -18,7 +18,8 @@ screen = pg.display.set_mode((800, 800)) #window (size)
|
||||
clock = pg.time.Clock()
|
||||
running = True
|
||||
|
||||
color = (255, 255, 255) #rectangle color
|
||||
color = (0, 0, 0) #rectangle color
|
||||
posX, posY = 0, 0 #recatangle position x, recatangle position y
|
||||
sizeW = 100 #rectangle size
|
||||
sizeH = 100 #rectangle size
|
||||
|
||||
@ -29,22 +30,15 @@ while running: #open window
|
||||
if event.type == pg.QUIT:
|
||||
running = False
|
||||
|
||||
posX, posY = 0, 0 #recatangle position x, recatangle position y
|
||||
s1 = True #wether or not the first square of the row should be black or white
|
||||
|
||||
#render frame
|
||||
screen.fill("black")
|
||||
|
||||
#chess game
|
||||
while posY < 800:
|
||||
posX = 0
|
||||
if s1 != True:
|
||||
posX = posX + 100
|
||||
while posX <= 800:
|
||||
while posX < 700:
|
||||
pg.draw.rect(screen, color, (posX, posY, sizeH, sizeW))
|
||||
print(posX)
|
||||
posX = posX + 200
|
||||
posY = posY + 100
|
||||
s1 = not s1
|
||||
print(posX)
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user