summaryrefslogtreecommitdiff
path: root/noncore/games/solitaire/card.cpp
authorkergoth <kergoth>2002-01-25 22:14:26 (UTC)
committer kergoth <kergoth>2002-01-25 22:14:26 (UTC)
commit15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff)
treec2fa0399a2c47fda8e2cd0092c73a809d17f68eb /noncore/games/solitaire/card.cpp
downloadopie-15318cad33835e4e2dc620d033e43cd930676cdd.zip
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2
Initial revision
Diffstat (limited to 'noncore/games/solitaire/card.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/solitaire/card.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/games/solitaire/card.cpp b/noncore/games/solitaire/card.cpp
new file mode 100644
index 0000000..609e280
--- a/dev/null
+++ b/noncore/games/solitaire/card.cpp
@@ -0,0 +1,53 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include "card.h"
22
23#include <qpe/config.h>
24
25#include <qpoint.h>
26#include <qlist.h>
27
28/*
29Card( eValue v, eSuit s, bool f ) :
30 val(v), suit(s), faceUp(f), showing(FALSE), ix(0), iy(0), iz(0), cardPile(NULL) { }
31virtual ~Card() { }
32eValue getValue() { return val; }
33eSuit getSuit() { return suit; }
34CardPile *getCardPile() { return cardPile; }
35bool isFacing() { return faceUp; }
36bool isShowing() { return showing; }
37bool isRed() { return ((suit == diamonds) || (suit == hearts)); }
38int getX(void) { return ix; }
39int getY(void) { return iy; }
40int getZ(void) { return iz; }
41void setCardPile(CardPile *p) { cardPile = p; }
42void setFace(bool f) { faceUp = f; }
43void flip(void) { flipTo(getX(), getY()); }
44virtual void setPos(int x, int y, int z) { ix = x; iy = y; iz = z; }
45virtual void move(int x, int y) { ix = x; iy = y; }
46virtual void move(QPoint p) { ix = p.x(); iy = p.y(); }
47virtual void flipTo(int x, int y, int steps = 8) { ix = x; iy = y; faceUp = !faceUp; redraw(); Q_UNUSED(steps); }
48virtual void showCard(void) { showing = TRUE; }
49virtual void hideCard(void) { showing = FALSE; }
50virtual void redraw(void) { }
51*/
52
53