little cleanup
This commit is contained in:
parent
63a5f17c0c
commit
73537ee635
1
pybottle/bottle-blaster.py
Normal file → Executable file
1
pybottle/bottle-blaster.py
Normal file → Executable file
@ -1,4 +1,5 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# Shoot the bottles as fast as possible.
|
||||
|
||||
from storm_games import *
|
||||
|
9
pybottle/storm_games.py
Normal file → Executable file
9
pybottle/storm_games.py
Normal file → Executable file
@ -1,6 +1,10 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Standard initializations and functions shared by all games."""
|
||||
|
||||
import os
|
||||
from os import listdir
|
||||
from os.path import isfile, join
|
||||
import pygame
|
||||
import time
|
||||
|
||||
@ -11,7 +15,6 @@ def initialize_gui(gameTitle):
|
||||
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)
|
||||
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user