/// <summary> /// ************************************************************************************************************************ /// SFEN符号表記。 /// ************************************************************************************************************************ /// /// ファイル名にも使えるように、ファイル名に使えない文字を置換します。 /// </summary> /// <returns></returns> public static string ToMoveStrSfenForFilename( IMove move, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0 ) { string moveText = ConvMoveStrSfen.ToMoveStrSfen(move); moveText = Conv_Filepath.ToEscape(moveText); return(moveText); }
/// <summary> /// 盤1個分のログ。 /// </summary> private static void AAA_Write_Node( IEngineConf engineConf, ref int logFileCounter, string nodePath, KifuNode node, KifuTree kifu, string relFolder, KyokumenPngEnvironment reportEnvironment ) { string fileName = ""; // 出力先 fileName = Conv_Filepath.ToEscape($"_log_{((int)node.Score)}点_{logFileCounter}_{nodePath}.png"); relFolder = Conv_Filepath.ToEscape(relFolder); // // 画像ログ // if (true) { int srcMasu_orMinusOne = -1; int dstMasu_orMinusOne = -1; if (null != node.Key) { srcMasu_orMinusOne = Conv_SyElement.ToMasuNumber(((RO_Star)node.Key.LongTimeAgo).Masu); dstMasu_orMinusOne = Conv_SyElement.ToMasuNumber(((RO_Star)node.Key.Now).Masu); } KyokumenPngArgs_FoodOrDropKoma foodKoma; if (null != node.Key.FoodKomaSyurui) { switch (Util_Komasyurui14.NarazuCaseHandle((PieceType)node.Key.FoodKomaSyurui)) { case PieceType.None: foodKoma = KyokumenPngArgs_FoodOrDropKoma.NONE; break; case PieceType.P: foodKoma = KyokumenPngArgs_FoodOrDropKoma.FU__; break; case PieceType.L: foodKoma = KyokumenPngArgs_FoodOrDropKoma.KYO_; break; case PieceType.N: foodKoma = KyokumenPngArgs_FoodOrDropKoma.KEI_; break; case PieceType.S: foodKoma = KyokumenPngArgs_FoodOrDropKoma.GIN_; break; case PieceType.G: foodKoma = KyokumenPngArgs_FoodOrDropKoma.KIN_; break; case PieceType.R: foodKoma = KyokumenPngArgs_FoodOrDropKoma.HI__; break; case PieceType.B: foodKoma = KyokumenPngArgs_FoodOrDropKoma.KAKU; break; default: foodKoma = KyokumenPngArgs_FoodOrDropKoma.UNKNOWN; break; } } else { foodKoma = KyokumenPngArgs_FoodOrDropKoma.NONE; } // 評価明細に添付 Util_KyokumenPng_Writer.Write1( Conv_KifuNode.ToRO_Kyokumen1(node), srcMasu_orMinusOne, dstMasu_orMinusOne, foodKoma, ConvMoveStrSfen.ToMoveStrSfen(node.Key), relFolder, fileName, reportEnvironment ); logFileCounter++; } // // 評価明細 // { Util_KifuTreeLogWriter.AAAA_Write_HyokaMeisai(engineConf, fileName, node, relFolder, reportEnvironment); } }