-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathStep1.py
More file actions
30 lines (24 loc) · 743 Bytes
/
Step1.py
File metadata and controls
30 lines (24 loc) · 743 Bytes
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
import pygame
import piano_lists as pl
from pygame import mixer
pygame.init()
pygame.mixer.set_num_channels(50)
font = pygame.font.Font('assets/Terserah.ttf', 48)
medium_font = pygame.font.Font('assets/Terserah.ttf', 28)
small_font = pygame.font.Font('assets/Terserah.ttf', 16)
real_small_font = pygame.font.Font('assets/Terserah.ttf', 10)
fps = 60
timer = pygame.time.Clock()
WIDTH = 52 * 35
HEIGHT = 400
screen = pygame.display.set_mode([WIDTH, HEIGHT])
pygame.display.set_caption('My Python Piano')
run = True
while run:
timer.tick(fps)
screen.fill('gray')
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
pygame.display.flip()
pygame.quit()