variables inutilles + retour de la coconut de TF2

This commit is contained in:
morinl 2022-12-10 17:05:00 +01:00
parent 5517672ac8
commit 6c37f1f79d
5 changed files with 9 additions and 25 deletions

View File

@ -3,7 +3,7 @@
#include <graph.h>
#include "cheat.h"
int cheat(int affichage[50],int tab[40], int sauv_pos[80], int im_x, int im_y){
int cheat(char affichage[50],int tab[40], int sauv_pos[80], int im_x, int im_y){
int x,n,pos_x,pos_y;
int i, oui;
while(n<1){

View File

@ -1,6 +1,6 @@
#ifndef CHEAT_H
#define CHEAT_H
int cheat(int affichage[50],int tab[40], int sauv_pos[80], int im_x, int im_y);
int cheat(char affichage[50],int tab[40], int sauv_pos[80], int im_x, int im_y);
#endif

View File

@ -7,9 +7,8 @@
#include "jeu.h"
int tirage_aleatoire(int nb_paires){
InitialiserGraphique();
char tirage[50];
int pos_x, pos_y, clic_x, clic_y, im_y, im_x;
int pos_x, pos_y;
int i, j;
int nb,score;
int tab[40];
@ -63,23 +62,5 @@ int tirage_aleatoire(int nb_paires){
i++;
}
}
/*for (i=0;i<19;i++){
printf("%03d", i);
printf(" ");
}
printf("\n");
for (j=0;j<4;j++){
for (i=0;i<20;i++){
printf("%03d", positions[i][j]);
printf(" ");
}
printf("\n");
}
for (i=0;i<40;i++){
printf("%d\n",tab[i]);
}*/
score=jeu(positions, nb_paires,tab);
}

8
jeu.c
View File

@ -9,12 +9,12 @@
#include "rejouer.h"
int jeu(int position[20][4], int nb_paires,int tab[40]){
int score=0,score2,repet,test=0;
int score=0,score2,repet;
int pos_x,pos_y,oui;
int i,j,g,l=0,n=0,x=0,stock_g_1,stock_g_2,sauv_pos[80];
int repet2, nb_images;
int a;
int clic_x,clic_y,im_y,im_x, im_x_1, im_x_2, im_y_1, im_y_2,xpos,ypos;
int clic_x,clic_y,im_x, im_x_1, im_x_2, im_y, im_y_1, im_y_2,xpos,ypos;
unsigned long temps, temps2,temps3=1;
char tempstab[50],affichage[50],scoretab[50];
@ -199,6 +199,10 @@ int jeu(int position[20][4], int nb_paires,int tab[40]){
if((xpos>=760 && xpos<=986) && (ypos>=460 && ypos<=504)){
a=rejouer();
}
if((xpos>=950 && xpos<=1002) && (ypos>=15 && ypos<=78)){
FermerGraphique();
return EXIT_SUCCESS;
}
}
}
FermerGraphique();

1
main.c
View File

@ -10,7 +10,6 @@
int main(void){
InitialiserGraphique();
CreerFenetre(0,0,1024,576);
int temps,coucou;
int nb_paires=menu();
tirage_aleatoire(nb_paires);
}