quote:
Originally posted by Cyrus:
The only reason why I've never wanted to write one is that you can't use a simple data structure, like a two dimensional array, to hold a game board.
Actually, a hex board would could easily be stored in a 2-d array. One axis of the board is your first array subscript; another axis 60 degrees away is the second subscript. Any member of a regular 2-d tesselation can be described by only two coordinates; the coordinate axes, however, won't necessarily be orthogonal to one another.
The only problem then becomes that along one diagonal [i,j] --> [i+1, j+1], the distance is 1, while along the other [i,j] --> [i+1, j-1], the distance between hexes is two.
LL <-- shoulda majored in math.