import I18n; import * as Screen from GUI.Screen; import * as Login from GUI.Screen.Login; import * as Hall from GUI.Screen.Hall; import * as Game from GUI.Screen.Game; import Save; var gamePath = window.location.pathname.match(/\/game\/([0-9A-Fa-f]+)/); if(gamePath) { var gameState = Save.get('games.state.Game#' + gamePath[1]); if(gameState != undefined) { Game.init(gameState); } else { Screen.dialog({ text: I18n.get('gameNotFound'), answers: [ {label: 'backToMain', action: function() {window.location = '..';}} ] }); } } else { Login.init(); Hall.init(); }