Mercurial > hg > rlgwebd
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 40:f7116eb3f791 | 41:ea3b7775009d |
|---|---|
| 140 return null; | 140 return null; |
| 141 } | 141 } |
| 142 if (!msgDict.t) | 142 if (!msgDict.t) |
| 143 return null; | 143 return null; |
| 144 else if (msgDict.t == "E") { | 144 else if (msgDict.t == "E") { |
| 145 if (msgDict.c == 1 || msgDict.c == 6 || msgDict == 7) { | 145 if (msgDict.c == 1 || msgDict.c == 6 || msgDict.c == 7) { |
| 146 gameover(); | 146 gameover(); |
| 147 } | 147 } |
| 148 debug(1, "Server error: " + msgDict.s); | 148 debug(1, "Server error: " + msgDict.s); |
| 149 } | 149 } |
| 150 else if (msgDict.t == "n") { | 150 else if (msgDict.t == "n") { |
