rendered paste body/*
* Petit démineur pou se faire la main avec SDL et le C.
* Programmer par JPascal
*/
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include "cases.h"
// #include "jeu.h"
#define MAX_VCASE 12
#define MAX_HCASE 12
#define NB_BOMBE 10
int main(int argc, char *argv[]){
struct cases tabCase[MAX_VCASE][MAX_HCASE];
//cases *tabTmp[MAX_HCASE];
//srand (time (NULL));
printf("## Lancement démineur\n");
printf("# Initialisation du jeu !\n");
/*
for(int i=0; i<MAX_VCASE; i++ ) {
for( int j=0; j<MAX_HCASE;j++ ) {
tabCase[i] = tabTmp;
}
}
for(int i=0; i< MAX_VCASE; i++ ) {
for( int j=0; j<MAX_HCASE;j++ ) {
initCase(tabCase[i][j],i,j,1);
//printf("# -> Initialisation de [%d,%d]\n",i,j);
tabTmp = tabCase[i];
printf("Etat de la case %d\n",tabTmp[j]->etat);
}
}
for(int i=0;i<NB_BOMBE;i++){
/*
int tmp_x , tmp_y;
cases *tmp = NULL;
do {
tmp_x = rand()%MAX_VCASE;
tmp_y = rand()%MAX_HCASE;
tmp = tabCase[tmp_x][tmp_y];
} while ( tmp->etat == 2 );
*/
//}
return 0;
}