🏗️ Built framework for games
This commit is contained in:
@ -137,13 +137,13 @@ def makeFiles():
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
# Creates trivia.json if it doesn't exist
|
||||
# Creates games.json if it doesn't exist
|
||||
try:
|
||||
f = open("resources/trivia.json","r")
|
||||
f = open("resources/games.json","r")
|
||||
except:
|
||||
logThis("trivia.json didn't exist. Making it now.")
|
||||
data = {"questions":{},"users":{}}
|
||||
with open("resources/trivia.json","w") as f:
|
||||
logThis("games.json didn't exist. Making it now.")
|
||||
data = {"trivia questions":{},"users":{}}
|
||||
with open("resources/games.json","w") as f:
|
||||
json.dump(data,f,indent = 4)
|
||||
finally:
|
||||
f.close()
|
||||
|
Reference in New Issue
Block a user