pygamehow to draw line code example
Example 1: draw a line pygame
pygame.draw.line(surface, color, start_pos, end_pos, width)
Example 2: pygame.draw.rect
pygame.draw.rect(surface, color, rect)
pygame.draw.line(surface, color, start_pos, end_pos, width)
pygame.draw.rect(surface, color, rect)