python version of bottleblaster.

This commit is contained in:
Storm dragon
2016-03-20 18:01:41 -04:00
parent b9986073f9
commit 63a5f17c0c
17 changed files with 40 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
"""Standard initializations and functions shared by all games."""
import os
import pygame
import time
def initialize_gui(gameTitle):
# start pygame
pygame.init()
# start the display (required by the event loop)
pygame.display.set_mode((320, 200))
pygame.display.set_caption(gameTitle)
# Load sounds from the sound directory
soundFileNames = next(os.walk("sounds/"))[2]
for i in soundFileNames:
if i[-4:] == ".ogg": i[:-4] = pygame.mixer.Sound("sounds/" + i)