Looking for board game traversal mechanics advice

Hello all,

I am building a board game with scripted character movement. Essentially, the player will select WASD (or something similar) and their character will move/jump to the next tile on the board game. It’s not related to Mario Party, but for the movement, you can compare it to that.

What’s the best way to connect the board pieces so that they are “linked” in any direction? Like if there is a piece connected to another piece on all four sides. What would you do?

I considered adding some sort of tag in each board “piece” that defines which other piece it is connected to. For example, two adjacent pieces will have a tag inside of the part that lists each other as an adjoining piece. The movement script can then go through and figure out which pieces it can move to just by iterating through those tags contained in whichever piece the player is standing on.