pedantic correntions
[naja.git] / naja / utils.py
index d69cd4ad73f42dfc71a28912a9e751deb3de3129..b15302a1bb01effb9e2a991b843654ea91c8aee0 100644 (file)
@@ -25,3 +25,10 @@ def move_glyph(move_name):
         'BISHOP': u'\u265d',
         'KNIGHT': u'\u265e',
     }.get(move_name, move_name.lower())
+
+
+def warp_to_game_state(game_state):
+    from naja.events import LoadGameEvent, SceneChangeEvent
+    from naja.scenes.game import GameScene
+    LoadGameEvent.post(game_state)
+    SceneChangeEvent.post(GameScene)