summaryrefslogtreecommitdiff
path: root/public/common/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/common/client.js')
-rw-r--r--public/common/client.js22
1 files changed, 6 insertions, 16 deletions
diff --git a/public/common/client.js b/public/common/client.js
index 393eb0a..288f479 100644
--- a/public/common/client.js
+++ b/public/common/client.js
@@ -361,9 +361,9 @@ function toggle_notepad() {
show_notepad()
}
-/* REMATCH & REPLAY BUTTONS WHEN GAME OVER */
+/* REMATCH & REPLAY BUTTONS WHEN GAME IS FINISHED */
-function on_game_over() {
+function on_finished() {
remove_resign_menu()
add_icon_button(1, "replay_button", "sherlock-holmes-mirror",
@@ -547,8 +547,10 @@ function connect_play() {
if (typeof on_update === "function")
on_update()
on_update_log(view.log_start, game_log.length)
- if (view.game_over)
- on_game_over()
+ break
+
+ case "finished":
+ on_finished()
break
case "snapsize":
@@ -569,10 +571,6 @@ function connect_play() {
if (typeof on_reply === "function")
on_reply(arg[0], arg[1])
break
-
- case "save":
- window.localStorage[params.title_id + "/save"] = arg
- break
}
}
}
@@ -743,14 +741,6 @@ function send_query(q, param) {
send_message("query", [ q, param ])
}
-function send_save() {
- send_message("save")
-}
-
-function send_restore() {
- send_message("restore", window.localStorage[params.title_id + "/save"])
-}
-
/* REPLAY */
function init_replay() {