Data structure for game Dots and Boxes

Using a pair of two-dimensional arrays of booleans called linesX and linesY makes sense to me. Each array would have one more row/column than the total number of squares on the board in that given X/Y direction. Here's a code sample of check square with that solution:

bool isSquareComplete(int x, int y) {
    return linesX[x][y] && linesX[x + 1][y] && linesY[x][y] && linesY[x][y + 1];
}

I recently did this and used a map of box objects. The map was a tuple and the box object. This allows for very fast access and is simpler to implement the edge algorithms. It is a lot easier to check unsuccessfully for <-1,0> rather than special case the left edge. To avoid the data duplication, there was an array representing the edges and the box objects knew how to access it.

One advantage of using box objects rather than just an array is that it makes strategy algorithms easier. You often want to keep track of lists of boxes that are close to full, etc. This can't be done easily in an array.