ajout de la fonction deplacer_souris dans partie.c et test avec modifications et ajout dans main.c mais ne fonctionne pas pour l'instant

This commit is contained in:
2025-12-06 02:29:59 +01:00
parent 1ca9ee8f1d
commit 3bdfa66583
4 changed files with 55 additions and 11 deletions
+20 -10
View File
@@ -175,11 +175,21 @@ int main(void){
if(verifier_victoire(grille,ligne,colonne) == 1 ){
jeu_fini = 1;
}
if (SourisCliquee()) {
SourisPosition();
if (deplacer_souris(grille, ligne, colonne, _X, _Y, l_case, h_case) == 1) {
coups++;
afficher_plateau(grille, ligne, colonne, coups, l_case, h_case);
if (verifier_victoire(grille, ligne, colonne) ==1 ) {
jeu_fini = 1;
}
}
}
}
}
if (jeu_fini == 1){
if (jeu_fini == 1){
ChoisirCouleurDessin(CouleurParNom("white"));
/* pense à utiliser img_w pour la largeur du rectangle blanc */
RemplirRectangle(50,150, img_w - 100,100);
@@ -198,13 +208,13 @@ int main(void){
vouloir_rejouer = 0;
break;
}
}
}
}
}
}
}
}
fermer_affichage();
return EXIT_SUCCESS;
}
fermer_affichage();
return EXIT_SUCCESS;
}