00001 /* checkMultiple.h 00002 */ 00003 #ifndef _CHECKMULTIPLE_H 00004 #define _CHECKMULTIPLE_H 00005 00006 #include "osl/piece.h" 00007 namespace osl 00008 { 00009 namespace effect_action 00010 { 00014 template<class State> 00015 struct CheckMultiple 00016 { 00017 Piece& piece; 00018 int count; 00019 CheckMultiple(Piece& piece) : piece(piece),count(0){} 00020 bool done() const { return count>=2; } 00021 template<Player P> 00022 void doAction(Piece p, Position) { piece=p; count++; } 00023 }; 00024 00025 } // namespace effect_action 00026 } // namespace osl 00027 00028 00029 #endif /* _CHECKMULTIPLE_H */ 00030 // ;;; Local Variables: 00031 // ;;; mode:c++ 00032 // ;;; c-basic-offset:2 00033 // ;;; End: 00034 00035