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 #ifndef GO_SORTEDMOVES_H 00009 #define GO_SORTEDMOVES_H 00010 00011 #include "SgMove.h" 00012 #include "SgSortedMoves.h" 00013 00014 #define GO_SORTED_MOVES_DEFAULT 3 00015 #define GO_SORTED_MOVES_MAX 20 00016 00017 /** Specialization of SgSortedMoves for Go: move = SgMove, value = int 00018 @todo make maxNuMoves a template parameter, use instead 00019 of GO_SORTED_MOVES_MAX */ 00020 class GoSortedMoves : 00021 public SgSortedMoves<SgMove, int, GO_SORTED_MOVES_MAX> 00022 { 00023 public: 00024 explicit GoSortedMoves(int maxNuMoves) : 00025 SgSortedMoves<SgMove, int, GO_SORTED_MOVES_MAX>(maxNuMoves) 00026 { 00027 Clear(); 00028 } 00029 00030 GoSortedMoves() : 00031 SgSortedMoves<SgMove, int, 00032 GO_SORTED_MOVES_MAX>(GO_SORTED_MOVES_DEFAULT) 00033 { 00034 Clear(); 00035 } 00036 00037 void Clear() 00038 { 00039 SgSortedMoves<SgMove, int, GO_SORTED_MOVES_MAX>::Clear(); 00040 SetInitLowerBound(1); 00041 SetLowerBound(1); 00042 } 00043 }; 00044 00045 #endif // GO_SORTEDMOVES_H 00046