2024-11-11 14:47:28 +01:00
|
|
|
#include <graph.h>
|
|
|
|
|
|
2024-11-12 23:57:03 +01:00
|
|
|
#include "menu.h"
|
2024-11-13 11:07:47 +01:00
|
|
|
#include "comportementJCJ.h"
|
|
|
|
|
#include "comportementJCIA.h"
|
2024-11-11 14:47:28 +01:00
|
|
|
|
2024-11-18 16:15:25 +01:00
|
|
|
int Jeu(){
|
|
|
|
|
int choix[2], taille = 0, victoire = 0;
|
2024-11-13 11:07:47 +01:00
|
|
|
Menu(choix);
|
|
|
|
|
taille = choix[1];
|
|
|
|
|
if(choix[0] == 1){
|
2024-11-18 16:15:25 +01:00
|
|
|
victoire = compJCJ(taille);
|
|
|
|
|
if(victoire == 1){
|
|
|
|
|
return 1;
|
|
|
|
|
}else if(victoire == 2){
|
|
|
|
|
return 2;
|
|
|
|
|
}
|
2024-11-13 11:07:47 +01:00
|
|
|
}else if (choix[0] == 2){
|
|
|
|
|
compJCIA(taille);
|
2024-11-18 16:15:25 +01:00
|
|
|
if(victoire == 1){
|
|
|
|
|
return 1;
|
|
|
|
|
}else if(victoire == 3){
|
|
|
|
|
return 3;
|
|
|
|
|
}
|
2024-11-12 23:57:03 +01:00
|
|
|
}
|
2024-11-11 14:47:28 +01:00
|
|
|
}
|