public static void SplitGroup_Ikusa( out SySet <SyElement> masus_seme_IKUSA, out SySet <SyElement> masus_kurau_IKUSA, SkyConst src_Sky, Fingers fingers_kurau_IKUSA, //戦駒(喰らう側) Fingers fingers_seme_IKUSA //戦駒(利きを調べる側) ) { masus_seme_IKUSA = Converter04.Fingers_ToMasus(fingers_seme_IKUSA, src_Sky); // 盤上のマス(利きを調べる側の駒) masus_kurau_IKUSA = Converter04.Fingers_ToMasus(fingers_kurau_IKUSA, src_Sky); // 盤上のマス(喰らう側の駒) }
/// <summary> /// 指定された局面で、指定された手番の駒の、利きマスを算出します。 /// 持ち駒は盤上にないので、利きを調べる必要はありません。 /// /// 「手目」は判定できません。 /// /// </summary> /// <param name="kouho"></param> /// <param name="sbGohosyu"></param> /// <param name="logger"></param> public static List_OneAndMulti <Finger, SySet <SyElement> > LAAAA_GetEffect( bool enableLog, bool isHonshogi, SkyConst src_Sky, Playerside pside_genTeban3, bool isAiteban, GraphicalLog_File logF_kiki, string logBrd_caption, int yomuDeep_forLog,//脳内読み手数 int tesumi_yomiCur_forLog, ShootingStarlightable move_forLog ) { GraphicalLog_Board logBrd_kiki = new GraphicalLog_Board(); logBrd_kiki.Caption = logBrd_caption;// "利き_" logBrd_kiki.Tesumi = tesumi_yomiCur_forLog; logBrd_kiki.NounaiYomiDeep = yomuDeep_forLog; //logBrd_kiki.Score = 0.0d; logBrd_kiki.GenTeban = pside_genTeban3;// 現手番 logF_kiki.boards.Add(logBrd_kiki); // 《1》 List_OneAndMulti <Finger, SySet <SyElement> > sMs_effect = new List_OneAndMulti <Finger, SySet <SyElement> >();//盤上の駒の利き { // 《1.1》 Playerside tebanSeme; //手番(利きを調べる側) Playerside tebanKurau; //手番(喰らう側) { if (isAiteban) { tebanSeme = Converter04.AlternatePside(pside_genTeban3); tebanKurau = pside_genTeban3; } else { tebanSeme = pside_genTeban3; tebanKurau = Converter04.AlternatePside(pside_genTeban3); } if (Playerside.P1 == tebanSeme) { logBrd_kiki.NounaiSeme = Gkl_NounaiSeme.Sente; } else if (Playerside.P2 == tebanSeme) { logBrd_kiki.NounaiSeme = Gkl_NounaiSeme.Gote; } } // 《1.2》 Fingers fingers_seme_IKUSA; //戦駒(利きを調べる側) Fingers fingers_kurau_IKUSA; //戦駒(喰らう側) Fingers dust1; Fingers dust2; Util_Things.AAABAAAA_SplitGroup( out fingers_seme_IKUSA, out fingers_kurau_IKUSA, out dust1, out dust2, src_Sky, tebanSeme, tebanKurau ); // 攻め手の駒の位置 GraphicalLog_Board boardLog_clone = new GraphicalLog_Board(logBrd_kiki); foreach (Finger finger in fingers_seme_IKUSA.Items) { RO_Star_Koma koma = Util_Koma.AsKoma(src_Sky.StarlightIndexOf(finger).Now); Gkl_KomaMasu km = new Gkl_KomaMasu( Util_GraphicalLog.PsideKs14_ToString(tebanSeme, Haiyaku184Array.Syurui(koma.Haiyaku), ""), Util_Masu.AsMasuNumber(koma.Masu) ); boardLog_clone.KomaMasu1.Add(km); } foreach (Finger finger in fingers_kurau_IKUSA.Items) { RO_Star_Koma koma = Util_Koma.AsKoma(src_Sky.StarlightIndexOf(finger).Now); logBrd_kiki.KomaMasu2.Add(new Gkl_KomaMasu( Util_GraphicalLog.PsideKs14_ToString(tebanKurau, Haiyaku184Array.Syurui(koma.Haiyaku), ""), Util_Masu.AsMasuNumber(koma.Masu) )); } logBrd_kiki = boardLog_clone; // 《1.3》 SySet <SyElement> masus_seme_IKUSA = Converter04.Fingers_ToMasus(fingers_seme_IKUSA, src_Sky); // 盤上のマス(利きを調べる側の駒) SySet <SyElement> masus_kurau_IKUSA = Converter04.Fingers_ToMasus(fingers_kurau_IKUSA, src_Sky); // 盤上のマス(喰らう側の駒) // 駒のマスの位置は、特にログに取らない。 // 《1.4》 Maps_OneAndOne <Finger, SySet <SyElement> > kmEffect_seme_IKUSA = Util_Things.Get_KmEffect_seme_IKUSA( fingers_seme_IKUSA,//この中身がおかしい。 masus_seme_IKUSA, masus_kurau_IKUSA, src_Sky, enableLog, Converter04.MoveToStringForLog(move_forLog, pside_genTeban3) );// 利きを調べる側の利き(戦駒) // 戦駒の利き logBrd_kiki = new GraphicalLog_Board(logBrd_kiki); kmEffect_seme_IKUSA.Foreach_Entry((Finger key, SySet <SyElement> value, ref bool toBreak) => { RO_Star_Koma koma = Util_Koma.AsKoma(src_Sky.StarlightIndexOf(key).Now); string komaImg = Util_GraphicalLog.PsideKs14_ToString(tebanSeme, Haiyaku184Array.Syurui(koma.Haiyaku), ""); foreach (Basho masu in value.Elements) { boardLog_clone.Masu_theEffect.Add((int)masu.MasuNumber); } }); logBrd_kiki = boardLog_clone; // 《1》 = 《1.4》の戦駒+持駒 sMs_effect.AddRange_New(kmEffect_seme_IKUSA); } return(sMs_effect); }