00001 #ifndef HEADER_ONWALL_H 00002 #define HEADER_ONWALL_H 00003 00004 #include "OnCondition.h" 00005 #include "Cube.h" 00006 00007 /** 00008 * Test whether model is on Wall. 00009 */ 00010 class OnWall : public OnCondition { 00011 public: 00012 virtual bool isSatisfy(Cube *model) const 00013 { 00014 return model->isWall(); 00015 } 00016 00017 virtual bool isWrong(Cube *model) const 00018 { 00019 return model->isAlive(); 00020 } 00021 }; 00022 00023 #endif