chaitu236 / TakWeb

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

Bug: Load TPS not working properly in all cases #37

Closed ghost closed 8 years ago

ghost commented 8 years ago

Tried to load the empty 5x5 board. [TPS "x5/x5/x5/x5/x5 1 1"] Board shows as 1x1 and there are 40 pieces for each side.

Tried to load a Tak puzzle: [x3,122,2S/x,22S,22C,11,121/121,212,12,21121C,1212S/21S,11,221,211S,12S/x,21S,2,x2 1 -] It shows the correct layout, but doesn't show any available pieces for the players.

Well DUH! that is an invalid TPS, because there are too many pieces on the board. My new changes fix that problem and give a warning about it.

ghost commented 8 years ago

BTW, I have a branch that fixes this. Hopefully my changes can be merged with TreffnonX changes. Sounds like we both did some modularization.

I want to give one more round of testing before I publish my branch.

TreffnonX commented 8 years ago

My modularizations are not likely to be taken one to one anyway, as I split index.html into as many as possible sub-files. However currently this means a slower loading time for the page, which can only be solved by 'compiling' the partial files into one before loading the files to the server. There is no proper workflow for this yet.

ghost commented 8 years ago

OK. I'll publish my branch, and then you guys can take a look at it and see what can be done for better modularization.