La simu multi-agents qui repeint une image, mais en c++ Boilerplate pompé ici : https://github.com/andrew-r-king/sfml-vscode-boilerplate
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PictureEnvironment.hpp 545B

123456789101112131415161718192021222324
  1. #ifndef PICTURE_ENVIRONMENT_H
  2. #define PICTURE_ENVIRONMENT_H
  3. #include <Agents/Perception/Perception.hpp>
  4. class PictureEnvironment
  5. { // The class
  6. public: // Access specifier
  7. int fWidth; // Attribute (int variable)
  8. int fHeight; // Attribute
  9. std::string fFilePath;
  10. sf::RenderWindow* fWindow;
  11. sf::Event fEvent;
  12. sf::CircleShape fShape;
  13. PictureEnvironment(std::string& iFilePath, sf::RenderWindow* iWindow);
  14. Perception getPerception(int iX, int iY);
  15. bool loop();
  16. private:
  17. PictureEnvironment();
  18. };
  19. #endif // PICTURE_ENVIRONMENT_H