-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf1.py
More file actions
27 lines (21 loc) · 620 Bytes
/
Copy pathf1.py
File metadata and controls
27 lines (21 loc) · 620 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
import pygame
pygame.init() #for pygame intialising
#for creating game window
GameWindow=pygame.display.set_mode((1000,500))
#for creating caption in window
pygame.display.set_caption("MY FIRST GAME")
#for creating game specific variables
exit_game=False
game_over=False
#creating a game loop
while not exit_game:
#event handling
for event in pygame.event.get():
if event.type == pygame.QUIT:
exit_game=True
#if event.type == pygame.KEYDOWN:
# if event.key == pygame.K_RIGHT:
# print("you have pressed right key")
pygame.quit() #quit function
quit()
"""