00001 /* selectPromotable.h 00002 */ 00003 #ifndef _SELECT_PROMOTABLE_H 00004 #define _SELECT_PROMOTABLE_H 00005 00006 #include "osl/piece.h" 00007 namespace osl 00008 { 00009 namespace effect_action 00010 { 00014 struct SelectPromotable 00015 { 00016 Piece result; 00017 SelectPromotable() : result(Piece::EMPTY()) 00018 { 00019 } 00020 template <Player P> 00021 void doAction(Piece cur, Position) 00022 { 00023 if (canPromote(cur.ptype())) 00024 result = cur; 00025 } 00026 }; 00027 00028 } // namespace effect_action 00029 } // namespace osl 00030 00031 #endif /* _SELECT_PROMOTABLE_H */ 00032 // ;;; Local Variables: 00033 // ;;; mode:c++ 00034 // ;;; c-basic-offset:2 00035 // ;;; End: