Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

OnStack.h

Go to the documentation of this file.
00001 #ifndef HEADER_ONSTACK_H
00002 #define HEADER_ONSTACK_H
00003 
00004 #include "OnCondition.h"
00005 #include "Cube.h"
00006 #include "Rules.h"
00007 
00008 /**
00009  * Test whether object can carry moved stack.
00010  */
00011 class OnStack : public OnCondition {
00012     public:
00013         virtual bool isSatisfy(Cube *model) const
00014         {
00015             bool result = false;
00016             if (!model->isAlive()) {
00017                 if (model->rules()->getDir() == Dir::DIR_NO
00018                         && model->rules()->isOnStrongPad(Cube::LIGHT))
00019                 {
00020                         result = true;
00021                 }
00022             }
00023             return result;
00024         }
00025 
00026         virtual bool isWrong(Cube *model) const
00027         {
00028             return model->isAlive();
00029         }
00030 };
00031 
00032 #endif

Generated on Wed Jun 1 09:54:31 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2