import pygame.locals as pgl
import pygame
-from naja.constants import KEYS, PALETTE, SCREEN
+from naja.constants import SCREEN, KEYS
from naja.events import SceneChangeEvent, LoadGameEvent
-from naja.sound import sound
from naja.scenes.scene import Scene
from naja.scenes.game import GameScene
from naja.gamestate import GameState
from naja.widgets.image_box import PreRenderedImageBox
-from naja.widgets.text import TextWidget, TextBoxWidget
class DummyGameScene(Scene):
if not state:
game_state = GameState.new(max_health=4, wins_required=4)
else:
- game_state = state
+ game_state = GameState.load(state['data'])
game = GameScene(game_state, play_sound=False)
game_surface = pygame.surface.Surface(SCREEN)
game.render(game_surface)