SabakiHQ / Sabaki

An elegant Go board and SGF editor for a more civilized age.
https://sabaki.yichuanshen.de/
MIT License
2.41k stars 376 forks source link

How to make sabaki to support other game, like Gomoku? #627

Closed zliu1022 closed 4 years ago

zliu1022 commented 4 years ago

Hi, @yishn

I like Sabaki UI very very much. And I wish to modify Sabaki to support Gomoku (five-in-a-row) which follow gtp protocol well, which means NOT to check the stone list's liberty and clean the stone with 0 liberty. I check the code and just guess it should be in sabaki/go-board? I don't know node.js well, I can only do very little modification inside sabaki main program, so I don't know how to modify this requirement.

Can you give me some tip?

Thank you.

friedrichren commented 4 years ago

This would be a lot of work, so maybe you should fork Sabaki and then start by trying to remove all the components that's not needed for Gomoku.

yishn commented 4 years ago

You can copy the code from the GoBoard class from @sabaki/go-board and modify the function makeMove to your liking. Then, adjusting the code in Sabaki, replace all occurences of require('@sabaki/go-board') with require('path/to/your/modified/GoBoard.js').