-
Notifications
You must be signed in to change notification settings - Fork 0
/
experiment.py
66 lines (28 loc) · 987 Bytes
/
experiment.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# this is just for practice window
import pygame
import sys
import time
# variabes
black = (0,0,0)
white = (255,255,255)
screen_w = 500
screen_h = 500
Fps = pygame.time.Clock()
screen = pygame.display.set_mode((screen_w,screen_h))
pygame.display.set_caption("experiment window".upper())
def draw_board():
pygame.draw.line(screen,black,(screen_w/2-60,100),(screen_w/2-60,400),5)
pygame.draw.line(screen,black,(screen_w/2,100),(screen_w/2,400),5)
pygame.draw.line(screen,black,(80,screen_h/2+35),(400,screen_h/2+35),5)
pygame.draw.line(screen,black,(80,screen_h/2-35),(400,screen_h/2-35),5)
def main():
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
sys.exit()
screen.fill(white)
# drawings goes here
pygame.display.flip()
Fps.tick(60)
pygame.quit()
main()