Exemple #1
0
        /// <summary>
        /// 駒の利き
        /// </summary>
        /// <param name="bbItiran_kikiZenbu"></param>
        /// <param name="bbItiran_kikiKomabetu"></param>
        /// <param name="hyoji"></param>
        public static void HyojiKomanoKiki(KikiBan.YomiKikiBan yomiKikiBan, StringBuilder hyoji)
        {
            Debug.Assert(yomiKikiBan.IsActiveBBKiki(), "");

            // 対局者別
            {
                hyoji.AppendLine("利き(対局者別)");
                YomiBitboard[] bbHairetu = new YomiBitboard[Conv_Taikyokusya.itiran.Length];
                foreach (Taikyokusya tai in Conv_Taikyokusya.itiran)
                {
                    bbHairetu[(int)tai] = new YomiBitboard(yomiKikiBan.CloneBBKikiZenbu(tai));
                }
                SpkBan_MultiColumn.Setumei_Bitboard(Conv_Taikyokusya.namaeItiran, bbHairetu,
                                                    " + ", "  ",
                                                    hyoji);
            }
            // 駒別
            {
                hyoji.AppendLine("利き(駒別)");
                foreach (Taikyokusya tai in Conv_Taikyokusya.itiran)// 対局者1、対局者2
                {
                    // 盤上
                    YomiBitboard[] bbHairetu = new YomiBitboard[Conv_Komasyurui.itiran.Length];
                    foreach (Komasyurui ks in Conv_Komasyurui.itiran)
                    {
                        bbHairetu[(int)ks] = new YomiBitboard(yomiKikiBan.CloneBBKiki(Med_Koma.KomasyuruiAndTaikyokusyaToKoma(ks, tai)));
                    }

                    SpkBan_MultiColumn.Setumei_Bitboard(Med_Koma.GetKomasyuruiNamaeItiran(tai), bbHairetu,
                                                        " + ", "  ",
                                                        hyoji);
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// 駒別の居場所
        /// </summary>
        /// <param name="hyoji"></param>
        static void AppendKomaBetuIbashoTo(IbashoBan.YomiIbashoBan yomiIbashoBan, StringBuilder hyoji)
        {
            hyoji.AppendLine("駒別の居場所");
            foreach (Taikyokusya tai in Conv_Taikyokusya.itiran)// 対局者1、対局者2
            {
                // 駒別
                foreach (Piece km_tai in Conv_Koma.itiranTai[(int)tai])
                {
                    hyoji.Append(SpkBanWaku.CutHeaderBanWidthZenkaku(Conv_Koma.GetName(km_tai)));
                }
                hyoji.AppendLine();

                // 盤
                YomiBitboard[] bbHairetu = new YomiBitboard[Conv_Komasyurui.itiran.Length];
                int            i         = 0;
                foreach (Komasyurui ks in Conv_Komasyurui.itiran)
                {
                    bbHairetu[i] = yomiIbashoBan.GetKoma(Med_Koma.KomasyuruiAndTaikyokusyaToKoma(ks, tai));
                    i++;
                }
                SpkBan_MultiColumn.Setumei_Bitboard(null, bbHairetu,
                                                    " 〇 ", "  ",
                                                    hyoji);
            }
        }
Exemple #3
0
 public YomiBitboard[] GetBB_Where(Taikyokusya tai)
 {
     YomiBitboard[] bbItiran = new YomiBitboard[Conv_Komasyurui.itiran.Length];
     foreach (Komasyurui ks in Conv_Komasyurui.itiran)
     {
         bbItiran[(int)ks] = new YomiBitboard(valuesKm[(int)Med_Koma.KomasyuruiAndTaikyokusyaToKoma(ks, tai)]);
     }
     return(bbItiran);
 }
Exemple #4
0
        public static Bitboard Extract_NewBB(YomiBitboard yomiBB_base, int cutHead, YomiBitboard yomiBB_mask)
        {
            Bitboard ret = new Bitboard();

            yomiBB_base.CopyTo(ret);

            // 頭を切り詰めます
            ret.LeftShift(cutHead);
            // マスクで抽出します
            yomiBB_mask.MaskTo(ret);
            return(ret);
        }
Exemple #5
0
 /// <summary>
 /// 駒の動き☆
 /// </summary>
 /// <param name="komanoUgokikata"></param>
 /// <param name="hyoji"></param>
 public static void HyojiKomanoUgoki(KikiBan.YomiKikiBan yomiKikiBan, int masuYososu, StringBuilder hyoji)
 {
     for (int ms = 0; ms < masuYososu; ms++)
     {
         hyoji.AppendLine($"ます{ ms}");
         foreach (Taikyokusya tai in Conv_Taikyokusya.itiran)
         {
             // 盤上
             YomiBitboard[] bbHairetu = new YomiBitboard[Conv_Komasyurui.itiran.Length];
             foreach (Komasyurui ks in Conv_Komasyurui.itiran)
             {
                 bbHairetu[(int)ks] = new YomiBitboard(BitboardsOmatome.KomanoUgokikataYk00.Clone_Merge(
                                                           Med_Koma.KomasyuruiAndTaikyokusyaToKoma(ks, tai), (Masu)ms));
             }
             SpkBan_MultiColumn.Setumei_Bitboard(Med_Koma.GetKomasyuruiNamaeItiran(tai), bbHairetu,
                                                 " + ", "  ",
                                                 hyoji);
             hyoji.AppendLine();
         }
     }
 }