I have this code:
def makeBoard():
squareX = 0
squareY = 0
squareType = "dark"
darkSquare = imageLoader("darkBrownSquare.png")
lightSquare = imageLoader("lightBrownSquare.png")
for x in range(8):
for y in range(8):
if squareType == "dark":
MAIN_SURF.blit(darkSquare, (squareX, squareY))
squareType = "light"
elif squareType == "light":
MAIN_SURF.blit(lightSquare, (squareX, squareY))
squareType = "dark"
squareY += 64
squareX += 64
It's meant to draw a checkerboard pattern, but I only get this instead:
I assume it's because of the for loops, and the fact that they are nested, but otherwise, I have no idea.