1 /*
2  * Copyright (C) 2000-2009 Stephan Kulow <coolo@kde.org>
3  *
4  * License of original code:
5  * -------------------------------------------------------------------------
6  *   Permission to use, copy, modify, and distribute this software and its
7  *   documentation for any purpose and without fee is hereby granted,
8  *   provided that the above copyright notice appear in all copies and that
9  *   both that copyright notice and this permission notice appear in
10  *   supporting documentation.
11  *
12  *   This file is provided AS IS with no warranties of any kind.  The author
13  *   shall have no liability with respect to the infringement of copyrights,
14  *   trade secrets or any patents by this file or any part thereof.  In no
15  *   event will the author be liable for any lost revenue or profits or
16  *   other special, indirect and consequential damages.
17  * -------------------------------------------------------------------------
18  *
19  * License of modifications/additions made after 2009-01-01:
20  * -------------------------------------------------------------------------
21  *   This program is free software; you can redistribute it and/or
22  *   modify it under the terms of the GNU General Public License as
23  *   published by the Free Software Foundation; either version 2 of
24  *   the License, or (at your option) any later version.
25  *
26  *   This program is distributed in the hope that it will be useful,
27  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
28  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29  *   GNU General Public License for more details.
30  *
31  *   You should have received a copy of the GNU General Public License
32  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
33  * -------------------------------------------------------------------------
34  */
35 
36 #ifndef GYPSY_H
37 #define GYPSY_H
38 
39 // own
40 #include "dealer.h"
41 
42 
43 class Gypsy : public DealerScene
44 {
45     Q_OBJECT
46 
47 public:
48     explicit Gypsy( const DealerInfo * di );
49     void initialize() override;
50 
51 protected:
52     void setGameState( const QString & state ) override;
53     bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const override;
54     bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const override;
55     void restart( const QList<KCard*> & cards ) override;
56 
57 protected Q_SLOTS:
58     bool newCards() override;
59 
60 private:
61     PatPile* talon;
62     PatPile* store[8];
63     PatPile* target[8];
64 
65     friend class GypsySolver;
66 };
67 
68 #endif
69