views:

72

answers:

1

Hello guys,

I'm defining a a type to represent a board of my game:

type Position = (int * Piece) list 

But when I create a list like this:

let board1 = [(1,Piece.BLACK);(2,Piece.WHITE);(3,Piece.BLACK);(4,Piece.WHITE);
              ...]

I create a list of (int * Piece) list, not a Position.

How can I change this? Which is the correct way?

E.g.:

val board1 : (int * Piece) list = [(1, BLACK); (2, WHITE); (3, BLACK); (4, WHITE);

Thanks in advance,

Pedro Dusso

+4  A: 

See my answer here.

http://cs.hubfs.net/forums/thread/16066.aspx

Brian