Beispiel #1
0
        /// <summary>
        /// 合法手レベル1
        /// </summary>
        /// <returns></returns>
        public static SySet <SyElement> Create_01Fu(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));
            }
            else if ((Okiba.Sente_Komadai | Okiba.Gote_Komadai).HasFlag(
                         Conv_SyElement.ToOkiba(masu_ji)))
            {
                //----------------------------------------
                // 駒台上の歩の移動先
                //----------------------------------------
                dst.AddSupersets(KomanoKidou.Dst_歩打面(pside));
            }

            return(dst);
        }
Beispiel #2
0
        /// <summary>
        /// 合法手レベル1
        /// </summary>
        /// <returns></returns>
        public static SySet <SyElement> Create_02Kyo(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));
            }
            else if ((Okiba.Sente_Komadai | Okiba.Gote_Komadai).HasFlag(
                         Util_Masu.Masu_ToOkiba(masu_ji)))
            {
                dst.AddSupersets(KomanoKidou.Dst_歩打面(pside));//香も同じ
            }

            return(dst);
        }