netoyage de fichier

This commit is contained in:
2024-11-20 15:01:35 +01:00
parent 685a4ce478
commit 5e9d6560b7
24 changed files with 114 additions and 198 deletions

View File

@@ -4,8 +4,6 @@
#include "definirMaxXY.h"
#include "initialisation.h"
#include "coordoner.h"
#include "effacehaut.h"
#include "verificationblock.h"
int compJCIA(int taille){
@@ -14,6 +12,7 @@ int compJCIA(int taille){
int emplacementcooX1 = 0, emplacementcooX2 = 0, emplacementcooY1 = 0, emplacementcooY2 = 0;
int grille[taille+2][taille+2];
int empblock[4] = {0, 0, 0, 0}, empperso[4] = {0, 0, 0, 0};
srand(time(NULL));
maxX = DefMaxX(taille);
maxY = DefMaxY(taille);
for(tabx = 0; tabx < taille + 2; tabx++){
@@ -42,7 +41,7 @@ int compJCIA(int taille){
initialiser++;
SourisX = 0;
SourisY = 0;
Efface();
EffaceIA();
EcrireTexte(30, 40, "Joueur 2 choisissez l'emplacement de base du pion 2", 1);
}
}else if (initialiser == 1){
@@ -69,7 +68,7 @@ int compJCIA(int taille){
ChargerSprite("croix2.png");
while(fin == 0){
if(tour == 0){
Efface();
EffaceIA();
EcrireTexte(30, 40, "Tour du joueur 1", 2);
SourisX = 0;
SourisY = 0;
@@ -108,7 +107,7 @@ int compJCIA(int taille){
placer = 1;
tour++;
}else if(tour == 1){
Efface();
EffaceIA();
EcrireTexte(30, 40, "Joueur 1 place le bloc", 2);
SourisX = 0;
SourisY = 0;
@@ -132,7 +131,7 @@ int compJCIA(int taille){
placer = 1;
tour++;
}else if(tour == 2){
Efface();
EffaceIA();
EcrireTexte(30, 40, "Tour du joueur 2", 2);
SourisX = 0;
SourisY = 0;
@@ -170,7 +169,7 @@ int compJCIA(int taille){
tour++;
}else if(tour == 3){
Efface();
EffaceIA();
EcrireTexte(30, 40, "Joueur 2 place le bloc", 2);
SourisX = 0;
SourisY = 0;
@@ -194,3 +193,10 @@ int compJCIA(int taille){
}
}
}
void EffaceIA(){
ChoisirCouleurDessin(CouleurParNom("white"));
RemplirRectangle(0, 0, 650, 50);
ChoisirCouleurDessin(CouleurParNom("black"));
}