-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpygame-blocks.py
17 lines (17 loc) · 1.65 KB
/
pygame-blocks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
BLOCKS = [
{'color': (255, 255, 0), 'text': "PYGAME", 'command': 'import pygame', 'arguments': 0, 'tab_increase': 0},
{'color': (255, 255, 0), 'text': "screen", 'command': 'screen = pygame.display.set_mode', 'arguments': 2, 'tab_increase':0},
{'color': (255, 255, 0), 'text': "set_caption", 'command': 'pygame.display.set_caption', 'arguments': 1, 'tab_increase':0},
{'color': (255, 255, 0), 'text': "quit", 'command': 'pygame.quit', 'arguments': 1, 'tab_increase':0},
{'color': (255, 255, 0), 'text': "delay", 'command': 'pygame.time.delay', 'arguments': 1, 'tab_increase':0},
{'color': (100, 200, 0), 'text': "event loop", 'command': 'for event in pygame.event.get', 'arguments': 1, 'tab_increase':1},
{'color': (100, 200, 0), 'text': "if event.type", 'command': 'if event.type == ', 'arguments': 1, 'tab_increase':1},
{'color': (255, 255, 0), 'text': "clock", 'command': 'clock = pygame.time.Clock', 'arguments': 1, 'tab_increase':0},
{'color': (255, 255, 0), 'text': "DT", 'command': 'dt = clock.tick', 'arguments': 1, 'tab_increase':0},
{'color': (255, 255, 0), 'text': "Draw Rectangle", 'command': 'pygame.draw.rect', 'arguments': 4},
{'color': (255, 255, 0), 'text': "Draw Circle", 'command': 'pygame.draw.circle', 'arguments': 4},
{'color': (255, 255, 0), 'text': "Draw Ellipse", 'command': 'pygame.draw.ellipse', 'arguments': 4},
{'color': (255, 255, 0), 'text': "Draw Line", 'command': 'pygame.draw.line', 'arguments': 4},
{'color': (255, 255, 0), 'text': "Refresh Screen", 'command': 'pygame.display.flip', 'arguments': 1},
{'color': (255, 255, 0), 'text': "Fill Screen", 'command': 'screen.fill', 'arguments': 1},
]