cli-games/pybottle/storm_games.py

21 lines
518 B
Python
Raw Normal View History

2016-03-20 18:35:23 -04:00
#!/bin/python
# -*- coding: utf-8 -*-
2016-03-20 18:01:41 -04:00
"""Standard initializations and functions shared by all games."""
import os
2016-03-20 18:35:23 -04:00
from os import listdir
from os.path import isfile, join
2016-03-20 18:01:41 -04:00
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
2016-03-20 18:35:23 -04:00
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
2016-03-20 18:01:41 -04:00