32 lines
376 B
C
32 lines
376 B
C
|
|
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include "plateau_init.h"
|
|
|
|
|
|
int* search_queue( int* queue, int** p) {
|
|
|
|
int i, j;
|
|
|
|
/* recherche de la tête et la queue dans le tableau */
|
|
|
|
for ( i = 0; i < LIGNES; i++) {
|
|
|
|
for ( j = 0; j < COLONNES; j++) {
|
|
|
|
if ( p[i][j] == -2) {
|
|
|
|
queue[0] = i;
|
|
queue[1] = j;
|
|
|
|
p[i][j] = 1;
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
return queue;
|
|
|
|
}
|