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 KBLOCKSGAMEMESSAGE_H
11#define KBLOCKSGAMEMESSAGE_H
12
13#include "KBlocksDefine.h"
14
15class KBlocksGameMessage
16{
17 public:
18 KBlocksGameMessage(int poolSize);
19 ~KBlocksGameMessage();
20
21 public:
22 bool pickGameResult(int * result);
23 bool putGameResult(int result);
24 void clearGameResult();
25
26 bool pickGameAction(int * type, int * action);
27 bool putGameAction(int type, int action);
28 void clearGameAction();
29
30 private:
31 int mPoolSize;
32
33 int mActionCount;
34 int* maActionType;
35 int* maActionList;
36
37 int mResultCount;
38 int* maResultList;
39};
40
41#endif
42
43