-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgridmaking.py
35 lines (25 loc) · 903 Bytes
/
gridmaking.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
Rohan Shah
Small animated grid that expands
"""
import pygame
from pygame.locals import *
from _dashes import draw_dashed_line
pygame.init()
screen = pygame.display.set_mode((400, 400), 0, 32)
pygame.display.set_caption('grid making')
clock = pygame.time.Clock()
lWidth = 2
while True:
draw_dashed_line(screen, (211, 211, 211), (0, 200), (400, 200), width=lWidth)
draw_dashed_line(screen, (70, 130, 180), (200, 0), (200, 400), width=lWidth)
pygame.draw.line(screen, (192, 192, 192), (15, 0), (15, 400), 30)
pygame.draw.line(screen, (192, 192, 192), (385, 0), (385, 400), 30)
pygame.draw.line(screen, (192, 192, 192), (0, 15), (400, 15), 30)
pygame.draw.line(screen, (192, 192, 192), (0, 385), (400, 385), 30)
lWidth += 1
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
clock.tick(30)
pygame.display.update()