import pygame
import sys
pygame.init()
screen = pygame.display.set_mode((400, 400))
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
screen.fill((255, 255, 255))
pygame.draw.polygon(screen, (0, 0, 0), [(200, 100), (100, 300), (200, 350)], 1)
pygame.draw.polygon(screen, (0, 0, 0), [(200, 100), (300, 300), (200, 350)], 1)
pygame.display.update()
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
import pygame
import sys
pygame.init()
screen = pygame.display.set_mode((400, 400))
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
screen.fill((255, 255, 255))
pygame.draw.polygon(screen, (0, 0, 0), [(200, 100), (100, 300), (200, 350)], 1)
pygame.draw.polygon(screen, (0, 0, 0), [(200, 100), (300, 300), (200, 350)], 1)
pygame.display.update()