Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

atomic_move.h

00001 /*
00002  *   EasySok --- A(nother) sokoban game for KDE.
00003  *
00004  *   Copyright (C) 2001 by Ralf Schmelter (ralfs@pc2a.chemie.uni-dortmund.de).
00005  *
00006  *   This program is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU General Public License version 2 as
00008  *   published by the Free Software Foundation.
00009  *
00010  *   This program 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
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License
00016  *   along with this program; if not, write to the Free Software
00017  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 
00020 
00021 #ifndef EASYSOK_ATOMIC_MOVE_INC_GUARD_H
00022 #define EASYSOK_ATOMIC_MOVE_INC_GUARD_H
00023 
00024 
00025 #include <qpoint.h>
00026 #include <qstring.h>
00027 
00028 
00029 
00030 
00041 class AtomicMove
00042 {
00043 
00044 public:
00045 
00050     enum AtomicMoveType
00051     {
00052 
00057         LEFT,
00058 
00059 
00064         RIGHT,
00065 
00066 
00071         UP,
00072 
00073 
00078         DOWN
00079     };
00080 
00081 
00088     AtomicMove(AtomicMoveType type);
00089 
00090 
00095     AtomicMoveType type() const;
00096 
00097 
00107     QPoint const & diff() const;
00108 
00109 
00114     QString toText() const;
00115 
00116 
00117 private:
00118 
00123     AtomicMoveType m_type;
00124 
00125 
00130     static QPoint const s_diffs[4];
00131 };
00132 
00133 
00134 #endif

Generated at Sun Jan 6 18:49:09 2002 for EasySok by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001