The title is pretty self explanatory. I'm trying to find out how to make a rectangle with arrays for this tetris game in python.
Here's the code:
screen = pygame.display.set_mode((400,800))
#Rectangle Variables
x = 200
y = 0
width = 50
height = 50
thickness = 5
speed = 1
#Colors
red = (255,0,0)
white = (255,255, 255)
green = (0,255,0)
blue = (0,0,255)
while(True):
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit (); sys.exit ();
#These lines ^ make the user able to exit out of the game window
y = y+1
pygame.draw.rect((screen) , red, (x,y,width,height), thickness)
pygame.display.update()