123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #ifndef PICTURE_ENVIRONMENT_H
- #define PICTURE_ENVIRONMENT_H
- #include "Platform/Platform.hpp"
- #include <Agents/Perception/Perception.hpp>
-
- class Agent;
-
- class PictureEnvironment
- { // The class
- public: // Access specifier
- std::string fFilePath;
- sf::RenderWindow* fWindow;
- util::Platform* fPlatform;
- const sf::Vector2f fSize;
- sf::Vector2f fInitialSize;
- sf::Event fEvent;
- sf::RectangleShape fShape;
-
- sf::Texture fTextureImage;
- sf::Image fImage;
-
- std::vector<std::unique_ptr<Agent>> fAgents;
- std::list<Agent>::iterator fAgentsIterator;
-
- PictureEnvironment(std::string& iFilePath, sf::RenderWindow* iWindow, util::Platform* iPlatform);
- void getPerception(Perception* ioPercept, int iX, int iY);
- void makeAgents(int iNumber);
- void makeRepaintAgents(int iNumber);
- bool paint(int iX, int iY, const sf::Color Color);
-
- uint32_t getCell(int iX, int iY);
-
- int getWidth();
- int getHeight();
- bool loop();
- void displayLockInput();
-
- private:
- PictureEnvironment();
- };
-
- #endif // PICTURE_ENVIRONMENT_H
|