summaryrefslogtreecommitdiffstats
path: root/kpat/fortyeight.h
blob: 3bb43b2b3db4fe10d919edef15fb8d30d94daab1 (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
47
48
#ifndef _FORTY_EIGHT_H
#define _FORTY_EIGHT_H

#include "dealer.h"

class HorLeftPile : public Pile
{
    Q_OBJECT
  TQ_OBJECT

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

class Fortyeight : public Dealer
{
    Q_OBJECT
  TQ_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 TQString getGameState() const;
    virtual void setGameState( const TQString & stream );

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

#endif


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