private void updateObjectId ( int lastStep , int nextStep ) { final int max = getMaxStep ( ) ; if ( nextStep < max ) { // Next step is free if ( checkObjectId ( path . getX ( nextStep ) , path . getY ( nextStep ) ) ) { takeNextStep ( lastStep , nextStep ) ; } else { avoidObstacle ( nextStep , max ) ; } } }
Update reference by updating map object Id .