Spaces:
Sleeping
Sleeping
Commit
·
b0d3efd
1
Parent(s):
17fd5e3
Fix bug 2
Browse files- src/game/__init__.py +15 -2
src/game/__init__.py
CHANGED
|
@@ -1,2 +1,15 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Conditional imports to avoid pygame dependency in web deployment
|
| 2 |
+
try:
|
| 3 |
+
from .game import Game
|
| 4 |
+
except ImportError:
|
| 5 |
+
# pygame not available, skip Game import for web deployment
|
| 6 |
+
Game = None
|
| 7 |
+
|
| 8 |
+
try:
|
| 9 |
+
from .play_env import PlayEnv
|
| 10 |
+
except ImportError:
|
| 11 |
+
# Skip PlayEnv if dependencies not available
|
| 12 |
+
PlayEnv = None
|
| 13 |
+
|
| 14 |
+
# Web-compatible components (always available)
|
| 15 |
+
from .web_play_env import WebPlayEnv
|