How to draw a rectangle in Pygame - Python Programming Tutorial

preview_player
Показать описание
This video explains how to draw a rectangle in Pygame as well as addresses common issues that people may run into while learning this.

Code:
import pygame

# initial pygame

# surface, color, and Rectangle object
color = (255, 0, 0)
rectangle = pygame.Rect(500, 500, 100, 200)

# draw rect function
while True:
exit(0)

Hope this video helped someone and I wish you luck on your programming journey!
Рекомендации по теме