Modifications
- Changement de nom pour le comparateur - Mise en commentaire du debug
This commit is contained in:
parent
3053a940cf
commit
5e031167a0
2 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ struct Evenement {
|
|||
static void affichage(Univers *, bool = false) noexcept;
|
||||
|
||||
private:
|
||||
struct comp {
|
||||
struct comp_organisme {
|
||||
bool operator()(Organisme * organisme_a, Organisme * organisme_b) const {
|
||||
int vitesse_a, vitesse_b;
|
||||
|
||||
|
|
|
@ -143,15 +143,15 @@ void Evenement::lancerSimulation(Univers * univers) {
|
|||
|
||||
while(univers->enVie()) {
|
||||
// On trie les organismes en fonction de leur vitesse
|
||||
std::sort(univers->m_liste_univers[univers->ID].second.begin(), univers->m_liste_univers[univers->ID].second.end(), comp());
|
||||
std::sort(univers->m_liste_univers[univers->ID].second.begin(), univers->m_liste_univers[univers->ID].second.end(), comp_organisme());
|
||||
|
||||
for(auto it: univers->m_liste_univers[univers->ID].second) {
|
||||
/* for(auto it: univers->m_liste_univers[univers->ID].second) {
|
||||
if(Animal * c = dynamic_cast<Animal *>(it)) {
|
||||
std::cout << it->lettre(it->ID) << " (" << it->ID << ") : " << c->vitesse << std::endl;
|
||||
} else {
|
||||
std::cout << it->lettre(it->ID) << " (" << it->ID << ");" << std::endl;
|
||||
}
|
||||
}
|
||||
} */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue