Skip to content
Settlers Journal
Go back

Designing the Graph Data Structure to Manage Board Pieces

Edit page

TLDR

Adding PLACE_SETTLEMENT action to the backend service and command line testing tool. Starting design of graph data structures and algorithms for piece placement.

alt text

Sketching out what the nodes of the graph should represent. Should all pieces be connected in a single graph? Could each node have a field that indicates which piece type the node refers to? For example, nodeType = ROAD | SETTLEMENT | HEXAGON? Do we hardcode the adjacency information in a lookup table?

alt text

Showing we can display settlements and roads on the UI by simply hardcoding an initial value for the underlying graph data structure.

Main work

Challenges

Learnings


Edit page
Share this post on:

Previous Post
Validation Logic for PLACE_FREE_SETTLEMENT Action
Next Post
Roll-for-Order Gameplay and Finite State Machine Cleanup