# Arup Guha
# 6/14/2025
# Italian Flag for SIUCF P2 Quiz 1 2025 Question 4

import pygame, sys
from pygame.locals import *

pygame.init()
DISPLAYSURF = pygame.display.set_mode((1000, 600))
pygame.display.set_caption("Italian Flag")

BLACK = pygame.Color(0,0,0)
RED = pygame.Color(255,0,0)
GREEN = pygame.Color(0,255,0)
WHITE = pygame.Color(255,255,255)

while True:

    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()

    DISPLAYSURF.fill(BLACK)

    # Green rectangle on the left.
    pygame.draw.rect(DISPLAYSURF, GREEN, (200, 100, 200, 400))

    # White in the middle
    pygame.draw.rect(DISPLAYSURF, WHITE, (400, 100, 200, 400))

    # Red in the right.
    pygame.draw.rect(DISPLAYSURF, RED,   (600, 100, 200, 400))
    pygame.display.update()
