cube game formula steps