public IEnumerator ShowMovementOptions(int numSpaces) { GameTile forwardTile = players[activePlayer].current_tile.next_tile; GameTile backTile = players[activePlayer].current_tile.prev_tile; for (int x = 1; x < numSpaces; ++x) { forwardTile = forwardTile.next_tile; backTile = backTile.prev_tile; } forwardTile.ActivateOutline(); backTile.ActivateOutline(); while (forwardTile.TileAvailable() && backTile.TileAvailable()) { yield return(null); } if (forwardTile.TileAvailable()) // if forward tile is till available (player has selected back tile) { players[activePlayer].current_tile = backTile; players[activePlayer].totalMoves += 1; TileEffect(); } else // if player has selected forward tile { players[activePlayer].current_tile = forwardTile; players[activePlayer].totalMoves += 1; TileEffect(); } forwardTile.DeactivateOutline(); backTile.DeactivateOutline(); }