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

59 lines
801 B
C++
Raw Normal View History

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