2024-11-15 15:45:18 +01:00
|
|
|
int initialisationX(int SourisX, int maxX, int taille){
|
|
|
|
|
int casejoueur = 0, x = 0, y = 50, verou = 0;
|
|
|
|
|
for(x = 0; x <= taille; x++){
|
|
|
|
|
if(SourisX >= 50 && SourisX <= maxX){
|
|
|
|
|
if(SourisX <= y && verou == 0){
|
|
|
|
|
casejoueur = x;
|
|
|
|
|
verou++;
|
|
|
|
|
}
|
|
|
|
|
y += 50;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return casejoueur;
|
|
|
|
|
}
|
2024-11-15 09:50:42 +01:00
|
|
|
|
2024-11-15 15:45:18 +01:00
|
|
|
int initialisationY(int SourisY, int maxY, int taille){
|
|
|
|
|
int casejoueur = 0, x = 0, y = 100, verou = 0;
|
|
|
|
|
for(x = 0; x <= taille; x++){
|
|
|
|
|
if(SourisY >= 100 && SourisY <= maxY){
|
|
|
|
|
if(SourisY <= y && verou == 0){
|
|
|
|
|
casejoueur = x;
|
|
|
|
|
verou++;
|
|
|
|
|
}
|
|
|
|
|
y += 50;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return casejoueur;
|
2024-11-15 09:50:42 +01:00
|
|
|
}
|
2024-11-15 17:22:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int initialisationXbox(int SourisX, int maxX, int taille){
|
|
|
|
|
int caseblock = 0, x = 0, y = 50, verou = 0;
|
|
|
|
|
for(x = 0; x <= taille; x++){
|
|
|
|
|
if(SourisX >= 50 && SourisX <= maxX){
|
|
|
|
|
if(SourisX <= y && verou == 0){
|
|
|
|
|
caseblock = x;
|
|
|
|
|
verou++;
|
|
|
|
|
}
|
|
|
|
|
y += 50;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return caseblock;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int initialisationYbox(int SourisY, int maxY, int taille){
|
|
|
|
|
int caseblock = 0, x = 0, y = 100, verou = 0;
|
|
|
|
|
for(x = 0; x <= taille; x++){
|
|
|
|
|
if(SourisY >= 100 && SourisY <= maxY){
|
|
|
|
|
if(SourisY <= y && verou == 0){
|
|
|
|
|
caseblock = x;
|
|
|
|
|
verou++;
|
|
|
|
|
}
|
|
|
|
|
y += 50;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return caseblock;
|
|
|
|
|
}
|