Closed merowin closed 4 weeks ago
I just realised this pull request has the same problem of maintainability as the other, because I'm calling functions of class Baduk that were previously private.
Other than this kind of "hack", I also considered implementing Keima such that the two moves that make up one keima are encoded in one move in the db. I think that would make the variant class simpler. The board component would need some additional changes.
I just realised this pull request has the same problem of maintainability as the other, because I'm calling functions of class Baduk that were previously private.
Hehe, this didn't bother me as much because the only assumption we made is that playMoveInternal
's only side effect is to mutate board
. IMO that's a reasonable assumption to rely on (but we should probably document it).
I also considered implementing Keima such that the two moves that make up one keima are encoded in one move in the db. I think that would make the variant class simpler. The board component would need some additional changes.
Interesting idea. I believe it would break SGF though :/
Here are some change proposals to variant Keima based on the poll + discussion that we had here: https://forums.online-go.com/t/collective-development-of-a-server-for-variants/43682/154
This rules makes it so the variant basically can't be played on boards <= 2x2, but I only just realised that I should include a check for that.