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 | #include "dealer.h" |
40 | |
41 | |
42 | class Gypsy : public DealerScene |
43 | { |
44 | Q_OBJECT |
45 | |
46 | public: |
47 | Gypsy( const DealerInfo * di ); |
48 | virtual void initialize(); |
49 | |
50 | protected: |
51 | virtual void setGameState( const QString & state ); |
52 | virtual bool checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const QList<KCard*> & newCards) const; |
53 | virtual bool checkRemove(const PatPile * pile, const QList<KCard*> & cards) const; |
54 | virtual void restart( const QList<KCard*> & cards ); |
55 | |
56 | protected slots: |
57 | virtual bool newCards(); |
58 | |
59 | private: |
60 | PatPile* talon; |
61 | PatPile* store[8]; |
62 | PatPile* target[8]; |
63 | |
64 | friend class GypsySolver; |
65 | }; |
66 | |
67 | #endif |
68 | |