diff --git a/www/index.html b/www/index.html index 15eb654..e23fb6c 100644 --- a/www/index.html +++ b/www/index.html @@ -9,6 +9,7 @@ + diff --git a/www/main.js b/www/main.js index f6562f4..f7b25cc 100644 --- a/www/main.js +++ b/www/main.js @@ -4,12 +4,13 @@ window.addEventListener('load', function() { var translations = Translations(); var i18n = I18n({translations: translations}); var fun = Fun(); + var save = Save(); var screen = Screen({dom: dom, i18n: i18n}); var messaging = Messaging({screen: screen}); - var session = Session({messaging: messaging}); + var session = Session({messaging: messaging, save: save}); var room = Room({dom: dom, messaging: messaging, session: session, fun: fun}); var statusHandler = StatusHandler(); - var login = Login({dom: dom, i18n: i18n, messaging: messaging, room: room, screen: screen, session: session, statusHandler: statusHandler}); + var login = Login({dom: dom, i18n: i18n, messaging: messaging, room: room, save: save, screen: screen, session: session, statusHandler: statusHandler}); var hanafuda = Hanafuda({fun: fun}); var game = Game({async: async, dom: dom, i18n: i18n, fun: fun, hanafuda: hanafuda, messaging: messaging, room: room, screen: screen, session: session, statusHandler: statusHandler}); @@ -26,6 +27,4 @@ window.addEventListener('load', function() { default: domElems[key].textContent = i18n.get(key); } } - - messaging.start(); });