summaryrefslogtreecommitdiffstats
path: root/kpat/fortyeight.h
blob: 858e6e15991ea26b913220c1dafc823eadcc0a79 (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
46
#ifndef _FORTY_EIGHT_H
#define _FORTY_EIGHT_H

#include "dealer.h"

class HorLeftPile : public Pile
{
    Q_OBJECT

public:
    HorLeftPile( int _index, Dealer* parent = 0);
    virtual QSize cardOffset( bool _spread, bool _facedown, const Card *before) const;
    virtual void initSizes();
};

class Fortyeight : public Dealer
{
    Q_OBJECT

public:
    Fortyeight( KMainWindow* parent=0, const char* name=0);
    virtual bool isGameLost() const;

public slots:
    void deal();
    virtual void restart();
    void deckClicked(Card *c);

protected:
    virtual bool checkAdd( int checkIndex, const Pile *c1, const CardList& c2) const;
    virtual Card *demoNewCards();
    virtual QString getGameState() const;
    virtual void setGameState( const QString & stream );

private:
    Pile *stack[8];
    Pile *target[8];
    HorLeftPile *pile;
    Deck *deck;
    bool lastdeal;
};

#endif


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