Mercurial > hg > rlgwebd
diff rlgterm.js @ 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 | e8ac0e3d2614 |
children | b848cb50cd69 |
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);