1/***************************************************************************
2* KBlocks, a falling blocks game for KDE *
3* Copyright (C) 2010 Zhongjie Cai <squall.leonhart.cai@gmail.com> *
4* *
5* This program is free software; you can redistribute it and/or modify *
6* it under the terms of the GNU General Public License as published by *
7* the Free Software Foundation; either version 2 of the License, or *
8* (at your option) any later version. *
9***************************************************************************/
10#ifndef SINGLE_GAME_INTERFACE
11#define SINGLE_GAME_INTERFACE
12
13#include "FieldInterface.h"
14#include "PieceInterface.h"
15
16class GameLogicInterface;
17
18class SingleGameInterface
19{
20 public:
21 SingleGameInterface(){};
22 virtual ~SingleGameInterface(){};
23
24 public:
25 virtual FieldInterface* getField() = 0;
26
27 virtual int getPieceCount() = 0;
28 virtual PieceInterface* getPiece(int) = 0;
29
30 virtual bool isActive() = 0;
31 virtual bool isGameRunning() = 0;
32
33 virtual int forceUpdateGame() = 0;
34 virtual int updateGame() = 0;
35 virtual int continueGame() = 0;
36
37 virtual bool setCurrentPiece(int, int, int) = 0;
38
39 virtual bool pickGameResult(int*) = 0;
40 virtual bool pickGameAction(int*, int*) = 0;
41
42 protected:
43 FieldInterface* mpField;
44
45 int mPieceCount;
46 PieceInterface** mpPieceList;
47};
48
49#endif //SINGLE_GAME_INTERFACE
50