Driver code to test above methods
int main ( ) { point start ( 1 , 1 ) ; point dest ( -2 , -1 ) ; line lines [ 3 ] ; lines [ 0 ] = line ( 1 , 0 , 0 ) ; lines [ 1 ] = line ( 0 , 1 , 0 ) ; lines [ 2 ] = line ( 1 , 1 , -2 ) ; cout << minJumpToReachDestination ( start , dest , lines , 3 ) ; return 0 ; }