//----------------------------------------------------------//
// Algorithmes de recherche dans un espace d'etats          //
//      A*                                                  //
//      Recherche gourmande                                 //
//      Cout uniforme                                       //
//                                                          //
// (C) H.Barbot, 2010                                       //
//----------------------------------------------------------//

//#include <time.h>
#include <stdio.h>
#include <stdlib.h>
//#include <ctype.h>
#include <cstdio>
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <string>

#include "envSimu.h"
#include "abbas_roth_header.h"

using namespace std;

//==========================================================//

char * choixTest () ;

int main()
{
	t_environnement * environnementSimulation = new t_environnement ;
	char * F = choixTest() ;
	while ( F != "FIN" ) {
		lire_environnement(F,environnementSimulation) ;
		imprimer_environnement(environnementSimulation) ;

		a_etoile(environnementSimulation, 1);
		demoEnvSimu ( environnementSimulation ) ;

		system("PAUSE");
		F = choixTest();

	};

	return 0;
};

char * choixTest ()
{
	int numeroTest ;
	system("CLS") ;
	printf("Jeu de test : \n") ;
	printf("\t 4 : 1 etat solution\n");
	printf("\t 5 : 2 etats solution\n");
	printf("? ") ;
	cin >> numeroTest ;
	switch (numeroTest) {
		case 4: return "04-g_h_1.txt";
		case 5: return "05-g_h_2.txt";
		default: return  "FIN";
	};
};


