summaryrefslogtreecommitdiffstats
path: root/kpat/golf.h
diff options
context:
space:
mode:
Diffstat (limited to 'kpat/golf.h')
-rw-r--r--kpat/golf.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/kpat/golf.h b/kpat/golf.h
new file mode 100644
index 00000000..9c3b6421
--- /dev/null
+++ b/kpat/golf.h
@@ -0,0 +1,45 @@
+#ifndef _GOLF_H_
+#define _GOLF_H_
+
+#include "dealer.h"
+
+class HorRightPile : public Pile
+{
+ Q_OBJECT
+
+public:
+ HorRightPile( int _index, Dealer* parent = 0);
+ virtual QSize cardOffset( bool _spread, bool _facedown, const Card *before) const;
+};
+
+class Golf : public Dealer
+{
+ Q_OBJECT
+
+public:
+ Golf( KMainWindow* parent=0, const char* name=0);
+ void deal();
+ virtual void restart();
+ virtual bool isGameLost() const;
+
+protected slots:
+ void deckClicked(Card *);
+
+protected:
+ virtual bool startAutoDrop() { return false; }
+ virtual Card *demoNewCards();
+ virtual bool cardClicked(Card *c);
+
+private: // functions
+ virtual bool checkAdd( int checkIndex, const Pile *c1, const CardList& c2) const;
+ virtual bool checkRemove( int checkIndex, const Pile *c1, const Card *c2) const;
+
+private:
+ Pile* stack[7];
+ HorRightPile* waste;
+ Deck* deck;
+};
+
+#endif
+
+//-------------------------------------------------------------------------//