File indexing completed on 2024-04-28 07:51:23

0001 /******************************************************************************
0002 *   KBlocks, a falling blocks game by KDE                                     *
0003 *   SPDX-FileCopyrightText: 2010-2021 Zhongjie Cai <squall.leonhart.cai@gmail.com>      *
0004 *                           Julian Helfferich <julian.helfferich@mailbox.org> *
0005 *                                                                             *
0006 *   SPDX-License-Identifier: GPL-2.0-or-later
0007 ******************************************************************************/
0008 #ifndef GAME_LOGIC_INTERFACE
0009 #define GAME_LOGIC_INTERFACE
0010 
0011 #include <QObject>
0012 
0013 #include "SingleGameInterface.h"
0014 
0015 class GameLogicInterface : public QObject
0016 {
0017     Q_OBJECT
0018 public:
0019     GameLogicInterface();
0020     ~GameLogicInterface() override {};
0021 
0022 public:
0023     virtual SingleGameInterface *getSingleGame(int) = 0;
0024 
0025     virtual int levelUpGame(int) = 0;
0026     virtual int updateGame(int *) = 0;
0027 
0028     virtual void setGameSeed(int) = 0;
0029 
0030     virtual void setGameStandbyMode(bool) = 0;
0031 
0032     virtual bool startGame(int) = 0;
0033     virtual bool stopGame() = 0;
0034 
0035     virtual void pauseGame(bool) = 0;
0036     virtual void continueGame() = 0;
0037 
0038     virtual bool hasSingleGames() = 0;
0039     virtual void deleteSingleGames() = 0;
0040 
0041 Q_SIGNALS:
0042     void allGamesStopped();
0043 
0044 protected:
0045     SingleGameInterface **maGameList;
0046 };
0047 
0048 #endif //GAME_LOGIC_INTERFACE