Dice._step()
Helper function for iterating through the cubes. Optionally, periodic boundary conditions are applied.
Stepping dimension
Step to move
Cube index
New cube index