put together some code to move a cube around (for doing bfs3d)