Version1/Puzzle.java
/*------------------------------------------------------------------------------
Soluction Function (will terminate all the programm)
------------------------------------------------------------------------------*/
Soluction Function (will terminate all the programm)
Soluction Function ( will terminate all the programm )
public static void solutionFoundInformed(PriorityNodes pn, int size){
        long total_time= end_time - start_time;
        double seconds = (double)total_time/ 1_000_000_000.0;
        System.out.println("Solução encontrada:");
        System.out.println("Número de movimentos: "+pn.getSteps());
        System.out.println("Movimentos:\n "+pn.getMoves());
        System.out.println("Número de nós criados: "+size);
        System.out.println("Tempo total: "+seconds+" segundos");
        System.exit(0);
    }
public static void solutionFoundInformed ( PriorityNodes pn , int size ) { long total_time = end_time - start_time ; double seconds = ( double ) total_time / 1_000_000_000.0 ; System . out . println ( "Solução encontrada:"); System . out . println ( "Número de movimentos: "+ p n. g etSteps( ) ) ; System . out . println ( "Movimentos:\n " + pn . getMoves ( ) ) ; System . out . println ( "Número de nós criados: "+s i ze); System . out . println ( "Tempo total: " + seconds + " segundos" ) ; System . exit ( 0 ) ; }
Soluction Function (will terminate all the programm)
Soluction Function ( will terminate all the programm )
//solution function for all Informed methods