Skip to content
Open
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions menu.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from globals_ import *

import pygame
#---------------------------Games---------------------
from game.classic import classic
from game.in_time import in_time
from game.berlin_wall import berlin_wall
from game.tron import tron

pygame.init()
#---------------------------Best----------------------
def read_bests(which): # read file and store best scores in a list
bests = open(bests_file_name)
Expand Down Expand Up @@ -284,6 +284,8 @@ def select_game():
return 0

elif evento.key == pygame.K_KP_ENTER or evento.key == pygame.K_RETURN:
pygame.mixer.usic.load('nagin.mp3')
pygame.mixer.music.play()
games[select][0]()

elif evento.key == pygame.K_DOWN:
Expand All @@ -296,6 +298,7 @@ def select_game():
return 0

def menu():

mode = 0
while True:
scr()
Expand Down Expand Up @@ -327,4 +330,4 @@ def menu():
mode = mode - 1 if mode > 0 else 0

elif evento.key == pygame.K_DOWN:
mode = mode + 1 if mode < 3 else 3
mode = mode + 1 if mode < 3 else 3
Binary file added nagin.mp3
Binary file not shown.