00001 //---------------------------------------------------------------------------- 00002 /** @file GoUtil.h 00003 General Go related utility functions. */ 00004 //---------------------------------------------------------------------------- 00005 00006 #ifndef GO_UTIL_H 00007 #define GO_UTIL_H 00008 00009 #include <string> 00010 00011 //---------------------------------------------------------------------------- 00012 00013 namespace GoUtil 00014 { 00015 /** Convert a score from a float to a string. 00016 The string representation is compatible to the one used in the SGF 00017 file format ant the GTP final_score command (e.g. W+2.5 if white wins, 00018 B+31 if black wins, and just 0 if the game ends in a draw). */ 00019 std::string ScoreToString(float score); 00020 } 00021 00022 //---------------------------------------------------------------------------- 00023 00024 #endif // GO_UTIL_H