Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- class mainWindow(object):
- def __init__(self, width, height, kastenW, kastenH, color):
- self.width = width
- self.height = height
- self.kastenW = kastenW
- self.kastenH = kastenH
- self.color = color
- def run(self):
- window = pygame.display.set_mode((self.width, self.height))
- window.fill((0, 0, 0))
- pygame.draw.rect(window, self.color, (10, 10, self.kastenW, self.kastenH))
- pygame.display.update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement