Supprime les #include superflues

This commit is contained in:
Mylloon 2022-04-12 09:57:20 +02:00
parent 5466ae7a5f
commit a93147276a
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
8 changed files with 8 additions and 15 deletions

View file

@ -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 :

View file

@ -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;

View file

@ -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

View file

@ -2,9 +2,8 @@
#define ECOSYSTEME_UNIVERS_HPP 1
#include <algorithm>
#include <random>
#include "animal.hpp"
#include "organisme.hpp"
#include "herbe.hpp"
class Univers {

View file

@ -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),

View file

@ -1,6 +1,5 @@
#include <cstring>
#include "../includes/univers.hpp"
#include "../includes/evenement.hpp"
void erreurArguments(char const * nom_programme) {

View file

@ -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

View file

@ -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;