chaitu236 / TakWeb

Javascript based Tak client
https://www.playtak.com
GNU General Public License v2.0
40 stars 18 forks source link

Check for wins in a loaded TPS #47

Closed ghost closed 8 years ago

ghost commented 8 years ago

Previous code for loading a TPS did not check whether the loaded position was a win. Now we check for all possible wins.

Added an enhancement to the gameover() method so that the caller could optionally provide a bit more information to the output message.

Also, fixed a small defect in the original code in which a bad socket connection tried to invoke "this.output()" but should have just been "output()".