draw triangle pygame code example
Example 1: triangle pygame
pg.draw.polygone(surface=window, color=(255,0,0), points=[(50,100), (100,50), (150,100)])
Example 2: draw a line pygame
pygame.draw.line(surface, color, start_pos, end_pos, width)
pg.draw.polygone(surface=window, color=(255,0,0), points=[(50,100), (100,50), (150,100)])
pygame.draw.line(surface, color, start_pos, end_pos, width)