Skip to content

Commit 570ae89

Browse files
authored
Create utils.py
1 parent 99f3587 commit 570ae89

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Shadow-Labyrinth/utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import pygame
2+
3+
LEVELS = [(20, 15), (25, 20), (30, 25), (35, 30), (40, 35)] # Width, height per level
4+
5+
def draw_text(screen, text, position, color, size=30):
6+
font = pygame.font.SysFont(None, size)
7+
text_surf = font.render(text, True, color)
8+
text_rect = text_surf.get_rect(center=position)
9+
screen.blit(text_surf, text_rect)

0 commit comments

Comments
 (0)