Grafika 1
import pygame
pygame.init()
screen_width = 1000
screen_height = 800
screen = pygame.display.set_mode((screen_width, screen_height))
done = False
white = pygame.Color(255, 255, 255)
while not done:
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True
position = (100, 100)
positionS = (400, 100)
pixelWidth = 10
pWidth = 150
pygame.draw.rect(screen, white, (position[0], position[1], pixelWidth, 400))
pygame.draw.rect(screen, white, (position[0], position[1], pWidth, pixelWidth))
pygame.draw.rect(screen, white, (position[0]+pWidth, position[1], pixelWidth, pWidth))
pygame.draw.rect(screen, white, (position[0], position[1]+pWidth, pWidth+pixelWidth, pixelWidth))
# pygame.draw.rect(screen, white, (positionS[0], positionS[1], pixelWidth, pWidth))
pygame.draw.rect(screen, white, (positionS[0], positionS[1], 200, 10))
pygame.draw.rect(screen, white, (positionS[0], positionS[1], 200, 10))
pygame.draw.rect(screen, white, (positionS[0], positionS[1], 10, 200))
pygame.draw.rect(screen, white, (positionS[0], positionS[1]+200, 200, 10))
pygame.draw.rect(screen, white, (positionS[0]+200, positionS[1]+200, 10, 200))
pygame.draw.rect(screen, white, (positionS[0], positionS[1]+400, 200+10, 10))
pygame.display.update()
pygame.quit()