1 /****************************************************************************** 2 * KBlocks, a falling blocks game by KDE * 3 * Copyright (C) 2010-2021 Zhongjie Cai <squall.leonhart.cai@gmail.com> * 4 * Julian Helfferich <julian.helfferich@mailbox.org> * 5 * * 6 * This program is free software; you can redistribute it and/or modify * 7 * it under the terms of the GNU General Public License as published by * 8 * the Free Software Foundation; either version 2 of the License, or * 9 * (at your option) any later version. * 10 ******************************************************************************/ 11 #ifndef GAME_LOGIC_INTERFACE 12 #define GAME_LOGIC_INTERFACE 13 14 #include <QObject> 15 16 #include "SingleGameInterface.h" 17 18 class GameLogicInterface : public QObject 19 { 20 Q_OBJECT 21 public: 22 GameLogicInterface(); ~GameLogicInterface()23 ~GameLogicInterface() override {}; 24 25 public: 26 virtual SingleGameInterface *getSingleGame(int) = 0; 27 28 virtual int levelUpGame(int) = 0; 29 virtual int updateGame(int *) = 0; 30 31 virtual void setGameSeed(int) = 0; 32 33 virtual void setGameStandbyMode(bool) = 0; 34 35 virtual bool startGame(int) = 0; 36 virtual bool stopGame() = 0; 37 38 virtual void pauseGame(bool) = 0; 39 virtual void continueGame() = 0; 40 41 virtual bool hasSingleGames() = 0; 42 virtual void deleteSingleGames() = 0; 43 44 Q_SIGNALS: 45 void allGamesStopped(); 46 47 protected: 48 SingleGameInterface **maGameList; 49 }; 50 51 #endif //GAME_LOGIC_INTERFACE 52