1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
int RechercheListeFermee(int m, int n) {
struct point *o;
o = (struct point *) malloc(sizeof(struct point));
(*o).indiceligne = m;
(*o).indicecolonne = n;
(*o).F = 0.0;
(*o).G = 0.0;
(*o).H = 0.0;
(*o).suivant = NULL;
if (ListeFermee != NULL){
struct point *pcourant = ListeFermee;
while ((*pcourant).suivant != NULL) {
if (((*pcourant).indiceligne == m ) && ((*pcourant).indicecolonne == n)){
return 0;
}
else{
pcourant = (*pcourant).suivant; }
}
return 1 ;
}
} |
Partager