File indexing completed on 2024-04-14 03:59:25
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 KBLOCKSSCORE_H 0008 #define KBLOCKSSCORE_H 0009 0010 enum KBlocks_Score_Type { 0011 KBlocksScore_Level_x_Factor = 0, 0012 KBlocksScore_Level_x_Level_x_Factor, 0013 KBlocksScore_Max_Count 0014 }; 0015 0016 class KBlocksScore 0017 { 0018 public: 0019 KBlocksScore(); 0020 ~KBlocksScore(); 0021 0022 int getScorePoint(); 0023 int getLineCount(); 0024 int getGameLevel(); 0025 0026 void setLevelUpFactor(int type, int factor); 0027 void setScoreUpFactor(int factor); 0028 0029 bool addScore(int lines); 0030 void clearScore(); 0031 0032 private: 0033 int mPoint; 0034 int mLines; 0035 int mLevel; 0036 0037 int mType; 0038 int mLFactor; 0039 int mSFactor; 0040 }; 0041 0042 #endif 0043