1 #ifndef HEADER_ONWALL_H 2 #define HEADER_ONWALL_H 3 4 #include "OnCondition.h" 5 #include "Cube.h" 6 7 /** 8 * Test whether model is on Wall. 9 */ 10 class OnWall : public OnCondition { 11 public: isSatisfy(Cube * model)12 virtual bool isSatisfy(Cube *model) const 13 { 14 return model->isWall(); 15 } 16 isWrong(Cube * model)17 virtual bool isWrong(Cube *model) const 18 { 19 return model->isAlive(); 20 } 21 }; 22 23 #endif 24