Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pacman.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#Pacman in Python with PyGame
#https://github.com/hbokmann/Pacman

import pygame._view
import pygame
import sys

black = (0,0,0)
white = (255,255,255)
Expand Down Expand Up @@ -547,6 +548,7 @@ def doNext(message,left,all_sprites_list,block_list,monsta_list,pacman_collide,w
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
pygame.quit()
sys.exit()
if event.key == pygame.K_RETURN:
del all_sprites_list
del block_list
Expand Down Expand Up @@ -577,4 +579,4 @@ def doNext(message,left,all_sprites_list,block_list,monsta_list,pacman_collide,w

startGame()

pygame.quit()
pygame.quit()