X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Futils.py;h=b15302a1bb01effb9e2a991b843654ea91c8aee0;hb=459169d622e79330b224d6733ced0d3dc04b1679;hp=d69cd4ad73f42dfc71a28912a9e751deb3de3129;hpb=5fe12b55d1908f850145eec16a1ee2c8e61ba6ef;p=naja.git diff --git a/naja/utils.py b/naja/utils.py index d69cd4a..b15302a 100644 --- a/naja/utils.py +++ b/naja/utils.py @@ -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)