sandpypi/settings.py
Stan44 1a6ef4f3c4 changed imports.py
it is now settings.py
settings handles loading the json file for the particles
and imports, and potentially other things such as
actual settings that are saveable and more
2024-12-26 05:21:13 -06:00

16 lines
392 B
Python

import pygame
import json
import random
import time
def load_particle_properties():
try:
with open('particles.json') as f:
return json.load(f)
except (FileNotFoundError, json.JSONDecodeError):
print("Error loading particles.json")
return {}
# Load particle properties once when module is imported
particle_properties = load_particle_properties()