I'm creating the classes for a hexgrid based game.
The problem is that I don't know how to make each "block" contain it's corners and edges since those are shared with others. The only plan I have at the moment is to create one container for each type(edge, corner, block) and then let each "block" contain the pointers to it's corners and edges.
There should be an easier way, could anyone point me in it's general direction?
I'm making a simple 4X game (civilization type of deal).
and the problem with my hexsquares that are the gamemap is that I store height in each corner, some information on the sides and the most in the tile itself.
But since each corner to each hex is shared with adjacent tiles I can't just create a container like : Corner[6] corners; since some of the corners are identical to others.
> The problem is that I don't know how to make each "block" contain it's corners and edges
> since those are shared with others.
> The only plan I have at the moment is to create one container for each type(edge, corner, block)
> and then let each "block" contain the pointers to it's corners and edges.