File indexing completed on 2024-04-28 07:51:24
0001 /*************************************************************************** 0002 * KBlocks, a falling blocks game by KDE * 0003 * SPDX-FileCopyrightText: 2010 Zhongjie Cai <squall.leonhart.cai@gmail.com> * 0004 * * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 ***************************************************************************/ 0007 #ifndef KBLOCKSGAMEMESSAGE_H 0008 #define KBLOCKSGAMEMESSAGE_H 0009 0010 #include "KBlocksDefine.h" 0011 0012 class KBlocksGameMessage 0013 { 0014 public: 0015 explicit KBlocksGameMessage(int poolSize); 0016 ~KBlocksGameMessage(); 0017 0018 public: 0019 bool pickGameResult(int *result); 0020 bool putGameResult(int result); 0021 void clearGameResult(); 0022 0023 bool pickGameAction(int *type, int *action); 0024 bool putGameAction(int type, int action); 0025 void clearGameAction(); 0026 0027 private: 0028 int mPoolSize; 0029 0030 int mActionCount; 0031 int *maActionType; 0032 int *maActionList; 0033 0034 int mResultCount; 0035 int *maResultList; 0036 }; 0037 0038 #endif 0039