This repository has been archived on 2022-05-02. You can view files and clone it, but cannot push or open issues or pull requests.
Ecosysteme/univers.hpp
Mylloon 4c937b5276
Ajout
- Includes
- Fonction carnivore
- Ajout d'organismes à l'univers
2022-04-01 23:43:58 +02:00

58 lines
801 B
C++

#ifndef _UNIVERS_HPP_
#define _UNIVERS_HPP_ 1
#include <iostream>
#include <vector>
class Organisme;
class Univers {
friend class Organisme;
int _m, _n, _tour;
int * _plateau;
public:
Univers(int, int);
void ajoutOrganismes(std::vector<Organisme*>);
};
class Organisme {
public:
Organisme(void);
};
class Animal: public Organisme {
public:
Animal(void);
virtual bool carnivore(void) = 0;
};
class Herbe: public Organisme {
public:
Herbe(void);
};
class Sel: public Organisme {
public:
Sel(void);
};
class Mouton: public Animal {
public:
Mouton(void);
bool carnivore(void);
};
class Loup: public Animal {
public:
Loup(void);
bool carnivore(void);
};
#endif