summaryrefslogtreecommitdiffstats
path: root/kpat/golf.h
blob: 7729e8f41cd899ec2251b8d2f2a433200490bfec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef _GOLF_H_
#define _GOLF_H_

#include "dealer.h"

class HorRightPile : public Pile
{
    Q_OBJECT

public:
    HorRightPile( int _index, Dealer* parent = 0);
    virtual TQSize 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

//-------------------------------------------------------------------------//