-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
39 lines (32 loc) · 797 Bytes
/
main.cpp
File metadata and controls
39 lines (32 loc) · 797 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
#include "animaux.hpp"
#include "univers.hpp"
using namespace std;
int main(){
// Univers doit être minimum 5x5.
// 4x5, 2x5, 5x4 incorrect
// 5x5, 5x6, 6x5 correct
srand(time(NULL));
//Univers u1(15, 15, 30, 5);
//Univers u1(1, 1, 5000, 500);
//Univers u1(1, 1, 0, 0);
Univers u1(5, 2, 2, 0);
//Univers u1(12, 12, 30, 5);
int compteur = 1000;
for(;;){
--compteur;
u1.afficher();
// if(compteur <= 1){
// u1.afficher();
// compteur = 1000;
// }
if(u1.estMort()){
u1.afficher();
cout << "L'univers est mort..." << endl;
return 0;
}
cin.ignore();
u1.simulerTour();
u1.miseAJourNombreAnimaux();
}
return 0;
}