00001 //---------------------------------------------------------------------------- 00002 /** @file GoSortedMoves.h 00003 Specialization of SgSortedMoves for Go: move = SgMove, value = int. 00004 00005 Move tables are used to store a small number of best moves. They 00006 have the usual operations Insert, Delete, etc. 00007 */ 00008 //---------------------------------------------------------------------------- 00009 #ifndef GO_SORTEDMOVES_H 00010 #define GO_SORTEDMOVES_H 00011 00012 #include "SgMove.h" 00013 #include "SgSortedMoves.h" 00014 00015 #define GO_SORTED_MOVES_DEFAULT 3 00016 #define GO_SORTED_MOVES_MAX 20 00017 00018 /** Specialization of SgSortedMoves for Go: move = SgMove, value = int 00019 @todo make maxNuMoves a template parameter, use instead 00020 of GO_SORTED_MOVES_MAX 00021 */ 00022 class GoSortedMoves : 00023 public SgSortedMoves<SgMove, int, GO_SORTED_MOVES_MAX> 00024 { 00025 public: 00026 explicit GoSortedMoves(int maxNuMoves) : 00027 SgSortedMoves<SgMove, int, GO_SORTED_MOVES_MAX>(maxNuMoves) 00028 { 00029 Clear(); 00030 } 00031 00032 GoSortedMoves() : 00033 SgSortedMoves<SgMove, int, 00034 GO_SORTED_MOVES_MAX>(GO_SORTED_MOVES_DEFAULT) 00035 { 00036 Clear(); 00037 } 00038 00039 void Clear() 00040 { 00041 SgSortedMoves<SgMove, int, GO_SORTED_MOVES_MAX>::Clear(); 00042 SetInitLowerBound(1); 00043 SetLowerBound(1); 00044 } 00045 }; 00046 00047 #endif // GO_SORTEDMOVES_H 00048