in reply to gaming board design
Easy. Just store for each square whether it has a south wall and wether it has a east wall. If you want to know whether a square has a north wall, just test to see it its north neighbour has a south wall (just be sure it has a neighbour to its north, otherwise it's on the border - of course, to make programming easier (at least, in some aspects) you could make an extra row of cells on the north and west sides). Similar for a west wall: just ask your neighbour on the west if it has an east wall.