Advertisement
Guest User

Untitled

a guest
Apr 1st, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1.  
  2.  
  3. ICore {
  4. public:
  5. ICore(); -> Dans dossier /games /graphique (libncurses.so)
  6. ~ICore();
  7. private:
  8. std::vector<IDisplayModule> libgraphique;
  9. std::vector<IGameModule> libgame;
  10. };
  11.  
  12. ----------------- ICORE CoreHandle()---------------------
  13.  
  14.  
  15.  
  16. int m = 0; (DISPLAY)
  17. int gValue = "EXIT"; (Choix du jeux)
  18. KeyBoard key;
  19.  
  20. while (m != "EXIT")) {
  21. gValue = "EXIT";
  22. while(gValue == "EXIT") {
  23. libgraphique[m].displayMenu(); // m = "EXIT" (EXIT), 1(SFML), 2(LIBCACA), 3(NCURSES)
  24. m = libgraphique[m].getDisplay();
  25.  
  26. key = libgraphique.getKey();
  27.  
  28. if (m == "EXIT")
  29. ExitArcade();
  30. gValue = libgraphique[m].getGame(); // Int gValue dans le IGameModule()
  31. }
  32. while (m != "EXIT" && m != "MENU") {
  33. key = libgraphique.getKey();
  34. libgame[gValue].update(key);
  35. libgraphique[m].displayGame(game);
  36. m = libgraphique[m].getDisplay();
  37. if (m == "EXIT")
  38. ExitArcade();
  39. gValue = libgraphique[m].getGame(); // Int gValue dans le IGameModule()
  40. }
  41. }
  42.  
  43. ----------------- ICORE ---------------------
  44.  
  45. IDisplayModule {
  46. displayMenu();
  47. display();
  48. InstantiateGraphique();
  49. InstantiateGame();
  50. getDisplay();
  51. getGame();
  52. }
  53. ADisplay {
  54. int gameValue = "EXIT";
  55. int displayValue; // Initialiser au constructeur
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement