diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2023-01-13 14:52:41 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2023-01-13 14:52:41 -0500 |
commit | d0bde3c60fa911ac0bb0f71ce2a6a963c874392e (patch) | |
tree | ddcc00fab2749cc7b4110eed9f69189b6fcc7422 /canevas.cpp | |
parent | 3fb8effa3603e9a9b96d263009fc1397433436ba (diff) |
Everything works before validation
Diffstat (limited to 'canevas.cpp')
-rw-r--r-- | canevas.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/canevas.cpp b/canevas.cpp index 1010ea6..0c203fc 100644 --- a/canevas.cpp +++ b/canevas.cpp @@ -10,9 +10,9 @@ Canevas::Canevas() { Couche couches[MAX_COUCHES]; - for (int i = 0; i < MAX_COUCHES; i++) { - couches[i] = Couche(); - }; + /* for (int i = 0; i < MAX_COUCHES; i++) { */ + /* couches[i] = Couche(); */ + /* }; */ couches[0].changerEtat(STATE_ACTIVE); } @@ -70,9 +70,7 @@ bool Canevas::retirerForme(int index) { double Canevas::aire() { double aire = 0; for (int i = 0; i < MAX_COUCHES; i++) { - if (couches[i].getEtat() == STATE_ACTIVE) { aire += couches[i].aire(); - }; }; return aire; }; @@ -92,3 +90,10 @@ void Canevas::afficher(ostream & s) { couches[i].afficher(s); }; }; + +bool Canevas::reinitialiserCouche(int index) { + if (index < 0 || index >= MAX_COUCHES){ + return false; + }; + return couches[index].reinitialiser(); +}; |