summaryrefslogtreecommitdiffstats
path: root/kfouleggs/board.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /kfouleggs/board.h
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip
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
Diffstat (limited to 'kfouleggs/board.h')
-rw-r--r--kfouleggs/board.h44
1 files changed, 44 insertions, 0 deletions
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<int> _field;
+ QMemArray<uint> _groups, _chainedPuyos;
+ uint _nbPuyos, _chained, _giftRest, _lastChained;
+};
+
+#endif