Hello,
I think your type should be:
type Board a b c d e f g h i =
Either (Three a b c)
(Either (Three d e f)
(Either (Three g h i)
(Either (Three a d g)
(Either (Three b e h)
(Either (Three c f i)
(Either (Three a e i)
(Three c e g)))))))
as far as i can understand, it seems thats it's mandatory for Player 1
to play in a,b,c to win?
So victory should go to player 2?
Cheers,
Corentin
On 4/16/10, Dan Piponi <[email protected]> wrote:
> On Thu, Apr 15, 2010 at 4:58 PM, Ashley Yakeley <[email protected]> wrote:
>
>> type Board a b c d e f g h i =
>> Either (Three a b c)
>> (Either (Three d e f)
>> (Either (Three g h i)
>> (Either (Three a d g)
>> (Either (Three b e h)
>> (Either (Three c f i)
>> (Either (Three a e i)
>> (Either (Three c e g)
>> )))))))
>
> In the service of readability we could also define:
>
> data X = X
> data O
>
> Though the victory conditions aren't precisely the usual ones.
> --
> Dan
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe