I currently have a project where I lay out a grid and on the start of the layout, create a dictionary that parses an XML file I have to manually create that lists every UID of the spaces and their adjacent tiles and marks them as free (0). So <UID, free/taken>.
The player can obviously only move to adjacent tiles (found though the XML parse) and if the adjacent tile is marked as 0. Anywhere the player moves, its obviously marked as 1. Also, the UID lets the player's piece move to that object as well which is kinda nice.
Tiles are not just in a line. they're hexagons, so it can have up to 8 adjacent tiles at one time.
Any suggestions as to a better method of doing this? The XML config is nice, but its a pain in the arse to have to redo for every level and will probably end up causing problems in the long run. I chose to do that initially because it was the only method I initially thought of that would work.
EDIT:
Currently looking at
scirra.com/forum/pluginboard-layout2board-behavior-grid-move_topic51891.html
Maybe will pursue this.