Say I'm building a board game with a hextile grid, like Settlers of Catan:
Note that each vertex and edge may have an attribute (a road and settlement above).
How would I make a data structure which represents this board? What are the patterns for accessing each tile's neighbors, edges and vertices?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…