-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsysteme.cpp
More file actions
43 lines (38 loc) · 702 Bytes
/
Copy pathsysteme.cpp
File metadata and controls
43 lines (38 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "coordonnees.h"
#include "proprietes.cpp"
#include "systeme.h"
#include "partie.h"
#include "cli.h"
int amorce() {
couleur(0);
char choix;
while(true){
choix = accueil();
switch(choix) {
case 't':
tests(); break;
case 'q':
return 0;
default:
Partie p;
jouerPartie(&p);
}
}
}
static void tests() {
couleur(3);
nettoyerAffichage();
testsCoordonnees();
testsPlateau();
testsBateaux();
pause();
couleur(0);
}
static char accueil() {
char entree[TAILLE_ENTREE];
nettoyerAffichage();
afficherAccueil();
demander("votre choix : ", entree, TAILLE_ENTREE);
if(entree[0] >= 'A' && entree[0] <= 'Z') return (entree[0] - 'A' + 'a');
return entree[0];
}