Пример #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="syurui"></param>
        /// <param name="masu_shogiban">0~80</param>
        /// <returns></returns>
        public static Kh185 ToHaiyaku(PieceType syurui, SyElement masu_shogiban, Playerside pside)
        {
            Kh185 result;

            int masuHandle = Util_Masu.AsMasuNumber(Util_Masu.BothSenteView(masu_shogiban, pside));

            if (Util_MasuNum.OnShogiban(masuHandle))
            {
                result = Data_HaiyakuTransition.Map[syurui][(int)masuHandle];
            }
            else if (Util_MasuNum.OnKomadai(masuHandle))
            {
                switch (syurui)
                {
                case PieceType.P: result = Kh185.n164_歩打; break;

                case PieceType.L: result = Kh185.n165_香打; break;

                case PieceType.N: result = Kh185.n166_桂打; break;

                case PieceType.S: result = Kh185.n167_銀打; break;

                case PieceType.G: result = Kh185.n168_金打; break;

                case PieceType.K: result = Kh185.n169_王打; break;

                case PieceType.R: result = Kh185.n170_飛打; break;

                case PieceType.B: result = Kh185.n171_角打; break;

                case PieceType.PR: result = Kh185.n170_飛打; break;

                case PieceType.PB: result = Kh185.n171_角打; break;

                case PieceType.PP: result = Kh185.n164_歩打; break;

                case PieceType.PL: result = Kh185.n165_香打; break;

                case PieceType.PN: result = Kh185.n166_桂打; break;

                case PieceType.PS: result = Kh185.n167_銀打; break;

                default: result = Kh185.n000_未設定; break;
                }
            }
            else if (Util_MasuNum.OnKomabukuro(masuHandle))
            {
                switch (syurui)
                {
                case PieceType.P: result = Kh185.n172_駒袋歩; break;

                case PieceType.L: result = Kh185.n173_駒袋香; break;

                case PieceType.N: result = Kh185.n174_駒袋桂; break;

                case PieceType.S: result = Kh185.n175_駒袋銀; break;

                case PieceType.G: result = Kh185.n176_駒袋金; break;

                case PieceType.K: result = Kh185.n177_駒袋王; break;

                case PieceType.R: result = Kh185.n178_駒袋飛; break;

                case PieceType.B: result = Kh185.n179_駒袋角; break;

                case PieceType.PR: result = Kh185.n180_駒袋竜; break;

                case PieceType.PB: result = Kh185.n181_駒袋馬; break;

                case PieceType.PP: result = Kh185.n182_駒袋と金; break;

                case PieceType.PL: result = Kh185.n183_駒袋杏; break;

                case PieceType.PN: result = Kh185.n184_駒袋圭; break;

                case PieceType.PS: result = Kh185.n185_駒袋全; break;

                default: result = Kh185.n000_未設定; break;
                }
            }
            else
            {
                result = Kh185.n000_未設定;
            }

            return(result);
        }