waltheri / wgo.js

JavaScript library for game of Go.
http://wgo.waltheri.net/
306 stars 127 forks source link

Territory counting? #69

Closed gamecubate closed 8 years ago

gamecubate commented 8 years ago

It seems as though WGo has no territory-counting capabilities, an essential for scoring of games. Is this functionality present somewhere although not documented? Thanks in advance.

waltheri commented 8 years ago

There is score counting mode, included in default player.

gamecubate commented 8 years ago

Ah I see. I created my own UI and player (d3-driven SVG), using WGo.Game as its engine. This explains why I had missed it.

I think a case can be made for integration of such a feature (scoring) into WGo.Game. What do you think? If OK, I can look at your player code and try and merge that functionality into WGo.Game, sending you a branch PR once done.

PS: nice engine by the way. API is simple and clear. Kudos.

waltheri commented 8 years ago

I would prefer to generalize scoremode.js, so it could be used independently of WGo board and player, but I wouldn't merge it with WGo.Game for now. You can try it.

Btw. is your SVG board public? I am looking for inspiration for next version of WGo.

gamecubate commented 8 years ago

I could make it public. i hadn't thought about it as I am still very much in prototyping mode right now. I have doubts it will be of much use to others as what i am developing is rather toy like. will send screenshot shortly.

gamecubate commented 8 years ago

I've put my client (of your game engine) project on standby pending closing of other urgent project. Will eventually resume and send link to SVG front-end source once done.