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