Exemplo n.º 1
0
        private void GetMoti(
            SkyConst src_Sky,
            out int mK,
            out int mR,
            out int mB,
            out int mG,
            out int mS,
            out int mN,
            out int mL,
            out int mP,

            out int mk,
            out int mr,
            out int mb,
            out int mg,
            out int ms,
            out int mn,
            out int ml,
            out int mp
            )
        {
            mK = 0;
            mR = 0;
            mB = 0;
            mG = 0;
            mS = 0;
            mN = 0;
            mL = 0;
            mP = 0;

            mk = 0;
            mr = 0;
            mb = 0;
            mg = 0;
            ms = 0;
            mn = 0;
            ml = 0;
            mp = 0;

            // 先手
            Fingers komasS = Util_Sky.Fingers_ByOkibaNow(src_Sky, Okiba.Sente_Komadai);

            foreach (Finger figKoma in komasS.Items)
            {
                RO_Star_Koma koma = Util_Koma.AsKoma(src_Sky.StarlightIndexOf(figKoma).Now);

                PieceType syurui = KomaSyurui14Array.NarazuCaseHandle(Haiyaku184Array.Syurui(koma.Haiyaku));
                if (PieceType.K == syurui)
                {
                    mK++;
                }
                else if (PieceType.R == syurui)
                {
                    mR++;
                }
                else if (PieceType.B == syurui)
                {
                    mB++;
                }
                else if (PieceType.G == syurui)
                {
                    mG++;
                }
                else if (PieceType.S == syurui)
                {
                    mS++;
                }
                else if (PieceType.N == syurui)
                {
                    mN++;
                }
                else if (PieceType.L == syurui)
                {
                    mL++;
                }
                else if (PieceType.P == syurui)
                {
                    mP++;
                }
                else
                {
                }
            }



            // 後手
            Fingers komasG = Util_Sky.Fingers_ByOkibaNow(src_Sky, Okiba.Gote_Komadai);

            foreach (Finger figKoma in komasG.Items)
            {
                RO_Star_Koma koma = Util_Koma.AsKoma(src_Sky.StarlightIndexOf((int)figKoma).Now);


                PieceType syurui = KomaSyurui14Array.NarazuCaseHandle(Haiyaku184Array.Syurui(koma.Haiyaku));

                if (PieceType.K == syurui)
                {
                    mk++;
                }
                else if (PieceType.R == syurui)
                {
                    mr++;
                }
                else if (PieceType.B == syurui)
                {
                    mb++;
                }
                else if (PieceType.G == syurui)
                {
                    mg++;
                }
                else if (PieceType.S == syurui)
                {
                    ms++;
                }
                else if (PieceType.N == syurui)
                {
                    mn++;
                }
                else if (PieceType.L == syurui)
                {
                    ml++;
                }
                else if (PieceType.P == syurui)
                {
                    mp++;
                }
                else
                {
                }
            }
        }