Supprime les #include superflues
This commit is contained in:
parent
5466ae7a5f
commit
a93147276a
8 changed files with 8 additions and 15 deletions
|
@ -1,9 +1,7 @@
|
|||
#ifndef ECOSYSTEME_ANIMAL_HPP
|
||||
#define ECOSYSTEME_ANIMAL_HPP 1
|
||||
|
||||
#include <random>
|
||||
|
||||
#include "organisme.hpp"
|
||||
#include "univers.hpp"
|
||||
|
||||
/* Un animal possède une vitesse, plus il est rapide,
|
||||
* plus vite il se déplacera à chaque tour, par exemple :
|
||||
|
|
|
@ -3,9 +3,8 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
#include "../includes/univers.hpp"
|
||||
#include "../includes/mouton.hpp"
|
||||
#include "../includes/loup.hpp"
|
||||
#include "mouton.hpp"
|
||||
#include "loup.hpp"
|
||||
|
||||
struct Evenement {
|
||||
Evenement() = delete;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef ECOSYSTEME_SEL_HPP
|
||||
#define ECOSYSTEME_SEL_HPP 1
|
||||
|
||||
#include "organisme.hpp"
|
||||
#include "herbe.hpp"
|
||||
|
||||
class Sel: public Organisme {
|
||||
const char _m_lettre = '-'; // caractère représentant le sel
|
||||
|
|
|
@ -2,9 +2,8 @@
|
|||
#define ECOSYSTEME_UNIVERS_HPP 1
|
||||
|
||||
#include <algorithm>
|
||||
#include <random>
|
||||
|
||||
#include "animal.hpp"
|
||||
#include "organisme.hpp"
|
||||
#include "herbe.hpp"
|
||||
|
||||
class Univers {
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
#include "../includes/animal.hpp"
|
||||
#include "../includes/univers.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
Animal::Animal(const int univers_ID, const int index, const int age_max,
|
||||
const int faim_max, const int p_vitesse): Organisme(univers_ID, false, index),
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <cstring>
|
||||
|
||||
#include "../includes/univers.hpp"
|
||||
#include "../includes/evenement.hpp"
|
||||
|
||||
void erreurArguments(char const * nom_programme) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "../includes/univers.hpp"
|
||||
#include "../includes/organisme.hpp"
|
||||
#include "../includes/univers.hpp" // on import ici et pas dans le .hpp car l'univers importe lui meme
|
||||
// organisme.hpp, donc si on importe univers.hpp dans organisme.hpp
|
||||
// alors univers.hpp ne pourra pas s'initalisé correctement
|
||||
|
||||
Organisme::Organisme(const int univers_ID, const bool superposable, const int index): m_univers_ID(univers_ID), m_index(index), ID(m_total_ID + 1) {
|
||||
// S'il n'y a plus d'index de libres
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#include "../includes/sel.hpp"
|
||||
#include "../includes/univers.hpp"
|
||||
|
||||
Sel::Sel(const int univers_ID, const int index): Organisme(univers_ID, true, index) {
|
||||
m_correspondance[ID] = _m_lettre;
|
||||
|
|
Reference in a new issue