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 GAMEPLAYINTERFACE_H
11#define GAMEPLAYINTERFACE_H
12
13#include <list>
14#include <string>
15
16enum KBlocks_Player_Action
17{
18 PlayerAction_None = 0,
19 PlayerAction_Move_Left,
20 PlayerAction_Move_Right,
21 PlayerAction_Move_Down,
22 PlayerAction_Push_Down,
23 PlayerAction_Rotate_CW,
24 PlayerAction_Rotate_CCW,
25 PlayerAction_Max_Count
26};
27
28typedef std::list<KBlocks_Player_Action> GamePlayer_ActionList;
29
30#include "SingleGameInterface.h"
31
32class GamePlayerInterface
33{
34 public:
35 GamePlayerInterface(){};
36 virtual ~GamePlayerInterface(){};
37
38 public:
39 virtual void startGame(SingleGameInterface*) = 0;
40 virtual void stopGame() = 0;
41
42 virtual void pauseGame(bool) = 0;
43
44 virtual void think(GamePlayer_ActionList * actionList) = 0;
45
46 virtual std::string getName() = 0;
47
48 protected:
49 SingleGameInterface* mpGame;
50};
51
52#endif
53
54