kgamesequence.h

00001 /*
00002     This file is part of the KDE games library
00003     Copyright (C) 2003 Andreas Beckermann (b_mann@gmx.de)
00004     Copyright (C) 2003 Martin Heni (martin@heni-online.de)
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License version 2 as published by the Free Software Foundation.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 /*
00021     $Id: kgamesequence.h 465369 2005-09-29 14:33:08Z mueller $
00022 */
00023 #ifndef __KGAMESEQUENCE_H_
00024 #define __KGAMESEQUENCE_H_
00025 
00026 #include <qobject.h>
00027 
00028 class KPlayer;
00029 class KGame;
00030 
00042 class KGameSequence : public QObject
00043 {
00044     Q_OBJECT
00045 public:
00046     KGameSequence();
00047     virtual ~KGameSequence();
00048 
00054     virtual KPlayer* nextPlayer(KPlayer *last, bool exclusive = true);
00055 
00056     virtual void setCurrentPlayer(KPlayer* p);
00057 
00061     KGame* game() const { return mGame; }
00062 
00063     KPlayer* currentPlayer() const { return mCurrentPlayer; }
00064 
00070     void setGame(KGame* game);
00071 
00079     virtual int checkGameOver(KPlayer *player);
00080 
00081 private:
00082     KGame* mGame;
00083     KPlayer* mCurrentPlayer;
00084 };
00085 
00086 #endif
00087 
KDE Home | KDE Accessibility Home | Description of Access Keys