I know a few of you tried to implement crumble. What data model have you used?This is what I came up with:Piece* color : {Black, White}* size[Horizontal, Vertical] : Rational* start[Horizontal, Vertical] : Rational
* connections[Top, Bottom, Left, Right] : array<Piece>
Board* size[Horizontal, Vertical] : Rational
Specifically in terms of pieces, I use the following:
Piece
* color : {"b", "w"}
* x, y : int
* height, width: int
Board
* pieces : Piece[]
* board : Piece[][]
My implementation has a minimum piece size, but the minimum size is
1/8 of an initial piece (ie, 1/4 in square, based on a the 2-inch
squares we're using to play), which we've never reached in real play
that I've seen, and it's just a constant so it could easily be
lowered. Board::board makes it really easy to look up what piece is
where. For instance, the piece directly above a piece is the piece at
Board::board[piece.x][piece.y + piece.height].
- Adam