More neat stuff added.

This commit is contained in:
Storm dragon 2016-03-26 12:14:01 -04:00
parent b2ad5fd755
commit 2ba781660d

View File

@ -9,6 +9,7 @@ from inspect import isfunction
from xdg import BaseDirectory from xdg import BaseDirectory
import pygame import pygame
import random import random
import requests
import speechd import speechd
import time import time
@ -25,8 +26,10 @@ def exit_game():
def initialize_gui(gameTitle): def initialize_gui(gameTitle):
# Check for, and possibly create, storm-games path # Check for, and possibly create, storm-games path
global HOME global HOME
global gamePath
HOME = BaseDirectory.xdg_config_home + "/storm-games" HOME = BaseDirectory.xdg_config_home + "/storm-games"
if not os.path.exists(HOME): os.makedirs(HOME) gamePath = HOME + "/" + str.lower(str.replace(gameTitle, " ", "-"))
if not os.path.exists(gamePath): os.makedirs(gamePath)
# Seed the random generator to the clock # Seed the random generator to the clock
random.seed() random.seed()
# Set game's name # Set game's name