ujh/iomrascalai — pull request #10 by TisButMe (2014-05-27 18:18:40+00:00)
Title: Improve chains handling

Again, a bigger than ideal PR, but it was hard not to do everything at the same time...

#### New stuff:
* Liberty counting and capturing now works, including in corners & sides
* Suicide prevention
* You can now almost play using the CLI !

#### Changes:
* Most of the methods of board that used to take (col, row) now take a Coord as parameter. This is a pain for tests, but it makes programming easier, as everything (almost) was handled using Coords, which meant that there were method call everywhere with method(coord.col, coord.row).
* Coord now stores the board size. This enables the addition of the neighbours() and is_inside() methods directly to Coords, which is pretty useful. This implies that the constructor now takes the board size as input.
* play() has been almost completely refactored into a lot of smaller methods (with hopefully good names) for legibility and increased maintainability.

#### To Do:
* Suicide prevention is a bit too eager, and won't let ko happen :(. To fix.
* General Ko handling.

#### RFC:
* I don't like very much the storage of board_size in every Coord... Then again, unless we pass it as parameter each time we use neighbours()/is_inside() we can't really work around that, and it felt strange to pass the size as a parameter there. Maybe it's better anyway ?

As usual, please tell me what you think of the design when you have time.