changeset 41:ea3b7775009d

rlgterm.js: fix failure to recognize end of game The RLG-Web client was failing to realize the game was over, because a test was checking against the entire response instead of the proper field in the response.
author John "Elwin" Edwards <elwin@sdf.org>
date Sat, 09 Jun 2012 10:44:11 -0700
parents f7116eb3f791
children 8f6bc0df58fa
files rlgterm.js
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rlgterm.js	Fri Jun 08 18:11:47 2012 -0700
+++ b/rlgterm.js	Sat Jun 09 10:44:11 2012 -0700
@@ -142,7 +142,7 @@
   if (!msgDict.t)
     return null;
   else if (msgDict.t == "E") {
-    if (msgDict.c == 1 || msgDict.c == 6 || msgDict == 7) {
+    if (msgDict.c == 1 || msgDict.c == 6 || msgDict.c == 7) {
       gameover();
     }
     debug(1, "Server error: " + msgDict.s);