00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KWIN4_PLAYER_H
00019 #define KWIN4_PLAYER_H
00020
00021
00022 #include <kplayer.h>
00023 #include <kconfiggroup.h>
00024
00025
00026
00027 #include "score.h"
00028
00029
00035 class KWin4Player : public KPlayer
00036 {
00037 Q_OBJECT
00038
00039 public:
00042 KWin4Player();
00043
00048 int rtti() const {return 1;}
00049
00054 void setStatus(Score *s) {mStatus=s;}
00055
00059 Score* status(){return mStatus;}
00060
00064 void readConfig(KConfigGroup& config);
00065
00069 void writeConfig(KConfigGroup& config);
00070
00073 void incWin();
00074
00077 void incRemis();
00078
00081 void incLost();
00082
00085 void incBrk();
00086
00089 int win() {return mAllWin.value();}
00090
00093 int lost() {return mAllLost.value();}
00094
00097 int brk() {return mAllBrk.value();}
00098
00101 int remis() {return mAllRemis.value();}
00102
00106 void resetStats(bool all=true);
00107
00108 protected slots:
00114 void slotPlayerPropertyChanged(KGamePropertyBase *prop,KPlayer *player);
00115
00116 private:
00117
00118 KGamePropertyInt mWin;
00119
00120
00121 KGamePropertyInt mRemis;
00122
00123
00124 KGamePropertyInt mLost;
00125
00126
00127 KGamePropertyInt mBrk;
00128
00129
00130 KGamePropertyInt mAllWin;
00131
00132
00133 KGamePropertyInt mAllRemis;
00134
00135
00136 KGamePropertyInt mAllLost;
00137
00138
00139 KGamePropertyInt mAllBrk;
00140
00141
00142 Score *mStatus;
00143 };
00144
00145 #endif // KWIN4_PLAYER_H
00146