00001 /* promote.h 00002 */ 00003 #ifndef _CATEGORY_PROMOTE_H 00004 #define _CATEGORY_PROMOTE_H 00005 00006 #include "osl/category/categoryEnv.h" 00007 #include "osl/category/categoryTraits.h" 00008 #include "osl/category/probTable.h" 00009 00010 namespace osl 00011 { 00012 namespace category 00013 { 00019 struct Promote : public StandardProbabilityCategory 00020 { 00021 static Interpolator<PieceValueTable> probTable; 00022 static const char *getName() { return "Promote"; } 00023 static bool isInCategory(const CategoryEnv& env, Move move) 00024 { 00025 return move.promoteMask() 00026 && (env.state->getPieceOnBoard(move.to()) == Piece::EMPTY()); 00027 } 00028 }; 00029 00030 } // namespace category 00031 } // namespace osl 00032 00033 #endif /* _CATEGORY_PROMOTE_H */ 00034 // ;;; Local Variables: 00035 // ;;; mode:c++ 00036 // ;;; c-basic-offset:2 00037 // ;;; End: