question: private static boolean withinTwo ( INode n , INode goal ) { DoubleLinkedList < IMove > moves = n . validMoves ( ) ; for ( Iterator < IMove > it = moves . iterator ( ) ; it . hasNext ( ) ; ) { IMove move = it . next ( ) ; INode successor = n . copy ( ) ; move . execute ( successor ) ; if ( withinOne ( successor , goal ) ) { return true ; } } return false ; }
target:  See if within two moves of solution. 