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 KBLOCKSPLAYMANAGER_H
11#define KBLOCKSPLAYMANAGER_H
12
13#include "GamePlayerInterface.h"
14#include "GameLogicInterface.h"
15#include "KBlocksSinglePlayer.h"
16
17class KBlocksPlayManager
18{
19 public:
20 KBlocksPlayManager(GameLogicInterface * p, int capacity);
21 ~KBlocksPlayManager();
22
23 public:
24 bool addGamePlayer(GamePlayerInterface * p, int thinkInterval, int processInterval);
25 void clearGamePlayer();
26
27 void startGame();
28 void stopGame();
29
30 void pauseGame(bool flag);
31
32 private:
33 GameLogicInterface* mpGameLogic;
34
35 int mPlayerCount;
36 int mMaxCapacity;
37 KBlocksSinglePlayer** maPlayerList;
38};
39
40#endif
41
42