コード例 #1
0
        /// <summary>
        /// 合法手レベル1
        /// </summary>
        /// <returns></returns>
        public static SySet <SyElement> Create_05Kin(Playerside pside, SyElement masu_ji)
        {
            SySet <SyElement> dst = new SySet_Default <SyElement>("金の移動先");

            if (Okiba.ShogiBan == Util_Masu.Masu_ToOkiba(masu_ji))
            {
                dst = Rule01_PotentialMove_15Array.CreateKin_static(pside, masu_ji);
            }
            else if ((Okiba.Sente_Komadai | Okiba.Gote_Komadai).HasFlag(
                         Util_Masu.Masu_ToOkiba(masu_ji)))
            {
                dst.AddSupersets(KomanoKidou.Dst_全打面(pside));
            }

            return(dst);
        }
コード例 #2
0
        /// <summary>
        /// 合法手レベル1
        /// </summary>
        /// <returns></returns>
        public static SySet <SyElement> Create_08Kaku(Playerside pside, SyElement masu_ji)
        {
            SySet_Default <SyElement> dst = new SySet_Default <SyElement>("角の移動先");

            if (Okiba.ShogiBan == Util_Masu.Masu_ToOkiba(masu_ji))
            {
                dst.AddSupersets(KomanoKidou.DstKantu_昇(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstKantu_沈(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstKantu_降(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstKantu_浮(pside, masu_ji));
            }
            else if ((Okiba.Sente_Komadai | Okiba.Gote_Komadai).HasFlag(
                         Util_Masu.Masu_ToOkiba(masu_ji)))
            {
                dst.AddSupersets(KomanoKidou.Dst_全打面(pside));
            }

            return(dst);
        }
コード例 #3
0
        /// <summary>
        /// 合法手レベル1
        /// </summary>
        /// <returns></returns>
        public static SySet <SyElement> Create_07Hisya(Playerside pside, SyElement masu_ji)
        {
            SySet_Default <SyElement> dst = new SySet_Default <SyElement>("飛車の移動先");

            if (Okiba.ShogiBan == Conv_SyElement.ToOkiba(masu_ji))
            {
                dst.AddSupersets(KomanoKidou.DstKantu_上(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstKantu_射(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstKantu_引(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstKantu_滑(pside, masu_ji));
            }
            else if ((Okiba.Sente_Komadai | Okiba.Gote_Komadai).HasFlag(
                         Conv_SyElement.ToOkiba(masu_ji)))
            {
                dst.AddSupersets(KomanoKidou.Dst_全打面(pside));
            }

            return(dst);
        }
コード例 #4
0
        /// <summary>
        /// 合法手レベル1
        /// </summary>
        /// <returns></returns>
        public static SySet <SyElement> Create_04Gin(Playerside pside, SyElement masu_ji)
        {
            SySet_Default <SyElement> dst = new SySet_Default <SyElement>("銀の移動先");

            if (Okiba.ShogiBan == Conv_SyElement.ToOkiba(masu_ji))
            {
                dst.AddSupersets(KomanoKidou.DstIppo_上(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstIppo_昇(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstIppo_沈(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstIppo_降(pside, masu_ji));
                dst.AddSupersets(KomanoKidou.DstIppo_浮(pside, masu_ji));
            }
            else if ((Okiba.Sente_Komadai | Okiba.Gote_Komadai).HasFlag(
                         Conv_SyElement.ToOkiba(masu_ji)))
            {
                dst.AddSupersets(KomanoKidou.Dst_全打面(pside));
            }

            return(dst);
        }