Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

card.cpp

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 
00021 #include "card.h"
00022 
00023 
00024 
00025 /*
00026 Card( eValue v, eSuit s, bool f ) :
00027     val(v), suit(s), faceUp(f), showing(FALSE), ix(0), iy(0), iz(0), cardPile(NULL) { }
00028 virtual ~Card() { }
00029 eValue getValue() { return val; }
00030 eSuit getSuit() { return suit; }
00031 CardPile *getCardPile() { return cardPile; }
00032 bool isFacing() { return faceUp; }
00033 bool isShowing() { return showing; }
00034 bool isRed() { return ((suit == diamonds) || (suit == hearts)); }
00035 int getX(void) { return ix; }
00036 int getY(void) { return iy; }
00037 int getZ(void) { return iz; }
00038 void setCardPile(CardPile *p) { cardPile = p; }
00039 void setFace(bool f) { faceUp = f; }
00040 void flip(void) { flipTo(getX(), getY()); }
00041 virtual void setPos(int x, int y, int z) { ix = x; iy = y; iz = z; }
00042 virtual void move(int x, int y) { ix = x; iy = y; }
00043 virtual void move(QPoint p) { ix = p.x(); iy = p.y(); }
00044 virtual void flipTo(int x, int y, int steps = 8) { ix = x; iy = y; faceUp = !faceUp; redraw(); Q_UNUSED(steps); }
00045 virtual void showCard(void) { showing = TRUE; }
00046 virtual void hideCard(void) { showing = FALSE; }
00047 virtual void redraw(void) { }
00048 */
00049 
00050 

Generated on Sat Nov 5 16:17:25 2005 for OPIE by  doxygen 1.4.2