From c90c389a8a8d9d8661e9772ec4144c5cf2039f23 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfouleggs/board.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 kfouleggs/board.h (limited to 'kfouleggs/board.h') diff --git a/kfouleggs/board.h b/kfouleggs/board.h new file mode 100644 index 00000000..e0889b3b --- /dev/null +++ b/kfouleggs/board.h @@ -0,0 +1,44 @@ +#ifndef FE_BOARD_H +#define FE_BOARD_H + +#include "common/board.h" + + +class FEBoard : public Board +{ + Q_OBJECT + public: + FEBoard(bool graphic, QWidget *parent); + void copy(const GenericTetris &); + + void start(const GTInitData &); + + uint nbPuyos() const { return _nbPuyos; } + uint chained() const { return _chained; } + uint nbChainedPuyos(uint i) const { return _chainedPuyos[i]; } + uint lastChained() const { return _lastChained; } + + private: + // standard methods + bool afterGlue(bool doAll, bool first); + AfterRemoveResult afterRemove(bool doAll, bool first); + bool afterGift(bool first) { return !doFall(false, first, true); } + void removeBlock(const KGrid2D::Coord &); + bool toBeRemoved(const KGrid2D::Coord &) const; + bool toFall(const KGrid2D::Coord &) const; + void remove(); + bool needRemoving(); + void computeInfos(); + + void init(); + + // Multiplayers methods + uint gift(); + bool putGift(uint); + + KGrid2D::Square _field; + QMemArray _groups, _chainedPuyos; + uint _nbPuyos, _chained, _giftRest, _lastChained; +}; + +#endif -- cgit v1.2.1