La simu multi-agents qui repeint une image, mais en c++ Boilerplate pompé ici : https://github.com/andrew-r-king/sfml-vscode-boilerplate
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Main.cpp 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #include <Agents/Agent.hpp>
  2. #include <Environment/PictureEnvironment.hpp>
  3. #include <unistd.h>
  4. int main()
  5. {
  6. util::Platform platform;
  7. #if defined(_DEBUG)
  8. std::cout << "Zé Parti" << std::endl;
  9. #endif
  10. //std::string filepath = "C:\\Users\\VroumVroumMachine\\Pictures\\dickbutt.jpg";
  11. //std::string filepath = "C:\\Users\\VroumVroumMachine\\Pictures\\caisseenre.png";
  12. std::string filepath = "C:\\Users\\VroumVroumMachine\\Pictures\\RepAgents\\PA315024.jpg";
  13. //std::string filepath = "C:\\Users\\VroumVroumMachine\\Pictures\\RepAgents\\PA304995.jpg";
  14. //std::string filepath = "C:\\Users\\VroumVroumMachine\\Pictures\\RepAgents\\P6224671.jpg";
  15. //std::string filepath = "content/sfml.png";
  16. sf::RenderWindow window;
  17. // in Windows at least, this must be called before creating the window
  18. // Use the screenScalingFactor
  19. //
  20. bool vDisplayOriginal = false;
  21. PictureEnvironment vEnvironment(filepath, &window, &platform, vDisplayOriginal);
  22. //vEnvironment.makeAgents(10000, 1, 10);
  23. vEnvironment.makeRepaintAgents(50, 30, 10);
  24. vEnvironment.makeStraightRepaintAgents(250, 20, 15);
  25. vEnvironment.makePullPaintAgents(50, 20, 10);
  26. //int i = 0;
  27. while (vEnvironment.loop())
  28. {
  29. ;
  30. //usleep(10);
  31. }
  32. //vEnvironment.displayLockInput();
  33. return 0;
  34. }