Driver code
public static void main ( String [ ] args ) { point start = new point ( 1 , 1 ) ; point dest = new point ( - 2 , - 1 ) ; line [ ] lines = new line [ 3 ] ; lines [ 0 ] = new line ( 1 , 0 , 0 ) ; lines [ 1 ] = new line ( 0 , 1 , 0 ) ; lines [ 2 ] = new line ( 1 , 1 , - 2 ) ; System . out . print ( minJumpToReachDestination ( start , dest , lines , 3 ) ) ; } }