The method described in [this answer](https://gamedev.stackexchange.com/a/198523/70421) can certainly work and is incredibly flexible. If you know you do not need that level of flexibility, you can make things (subjectively) simpler by writing the code to your specific use case. For example, if we wanted to allow moving on this board: ``` 3--4--5 / / 0--1--2 ``` Then the following implementation which hard-codes in the split and join could be used: ```python3 SPLIT = 1 JOINS_TO_FOUR = [2,3] LAST_SPACE = 5 def moves_from(space_index): """Returns an array of the space indexes of the moves that can be made from this space index. """ if space_index == SPLIT: return [2,3] elif space_index in JOINS_TO_FOUR: return [4] elif 0 <= space_index < LAST_SPACE: return [space_index + 1] else: return [] ```