示例#1
0
        internal int Verify(string facelets)
        {
            int count = 0x000000;

            try
            {
                string center = new string(new char[]
                {
                    facelets[4],
                    facelets[13],
                    facelets[22],
                    facelets[31],
                    facelets[40],
                    facelets[49]
                });
                for (int i = 0; i < 54; i++)
                {
                    f[i] = (sbyte)center.IndexOf(facelets[i]);
                    if (f[i] == -1)
                    {
                        return(-1);
                    }
                    count += 1 << (f[i] << 2);
                }
            }
            catch
            {
                return(-1);
            }
            if (count != 0x999999)
            {
                return(-1);
            }
            Util.ToCubieCube(f, cc);
            return(cc.Verify());
        }