Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ICore {
- public:
- ICore(); -> Dans dossier /games /graphique (libncurses.so)
- ~ICore();
- private:
- std::vector<IDisplayModule> libgraphique;
- std::vector<IGameModule> libgame;
- };
- ----------------- ICORE CoreHandle()---------------------
- int m = 0; (DISPLAY)
- int gValue = "EXIT"; (Choix du jeux)
- KeyBoard key;
- while (m != "EXIT")) {
- gValue = "EXIT";
- while(gValue == "EXIT") {
- libgraphique[m].displayMenu(); // m = "EXIT" (EXIT), 1(SFML), 2(LIBCACA), 3(NCURSES)
- m = libgraphique[m].getDisplay();
- key = libgraphique.getKey();
- if (m == "EXIT")
- ExitArcade();
- gValue = libgraphique[m].getGame(); // Int gValue dans le IGameModule()
- }
- while (m != "EXIT" && m != "MENU") {
- key = libgraphique.getKey();
- libgame[gValue].update(key);
- libgraphique[m].displayGame(game);
- m = libgraphique[m].getDisplay();
- if (m == "EXIT")
- ExitArcade();
- gValue = libgraphique[m].getGame(); // Int gValue dans le IGameModule()
- }
- }
- ----------------- ICORE ---------------------
- IDisplayModule {
- displayMenu();
- display();
- InstantiateGraphique();
- InstantiateGame();
- getDisplay();
- getGame();
- }
- ADisplay {
- int gameValue = "EXIT";
- int displayValue; // Initialiser au constructeur
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement