ujh/iomrascalai — pull request #12 by TisButMe (2014-05-29 17:04:52+00:00)
Title: Add tromp taylor rules

There we go, a hopefully fully working implementation of Tromp Taylor rules.

It's missing scoring for the moment, but it handle ko/superko using Zobrist hashing (which I had to learn about to do this, yay learning ! :) )

I've seen a pattern quite a lot where I'm passing around a Color and Coord for the new move. I've had a look at other engines, and they deal with this by having a Move class, which is basically Color + Coord.

What do you think about having this as well ?

The other pro is that right now i'm handling passing by using Option<(u8,u8)> in play(), and None to signal a Pass. With Move we could have variant like this:
```
pub enum Move {
Play(Color, Coord), //or even Play(Color, u8, u8), but then we would need to pattern match the coords instead of having names for them
Pass(Color)
}
```
I think that would be easier/more beautiful. Compare:
```
// Currently
b.play(Black, Some((8,8)));
b.play(White, None);

// Expected
b.play(Play(Black, 8, 8));
b.play(Pass(White));
```
What do you think ?