Need help with moving pawn piece on board

One way to do this, I think, is to create a list of the cell positions in the order you would reach them if traveling from 1 to 2 to 3, etc. all the way to 100:

91,92,93,94,95,96,97,98,99,100,90,89,87, etc.

You can do this with the make list from text with delimiter "," block.

When you start the game, you are at index=1 so you get list item #1’s value and use that for the cell number (91). When you shake and get a value, you take the current index (which would be 1 if you’re just starting the game) and add the shake value to it. Then you take the list item’s value at that new index.

Here’s an example. Let’s say you’re on #18 and you shake a 4. You should end up on #22, right? The way that would get calculated is to take the index where the player currently is (18) and add 4 to it to get an index of 22. Then you get the 22nd item from the list which is the value 72 and you move the pawn to that cell.

2 Likes