コード例 #1
0
        protected override bool GetPriorityForPlay(CFingerPosition cFngr, bool fCapo, out int nPriority)
        {
            nPriority = 0;
            if (!cFngr.IsValid())
            {
                return(false);
            }

            int nResult = 0;

            nResult += (cFngr.Fret * 3);

            if (fCapo)
            {
                nResult -= 10; // TODO: Change to be constants.
            }

            nPriority = nResult;
            return(true);
        }
コード例 #2
0
        protected override bool GetPriorityForPlay(CFingerPosition cFngr, bool fCapo, out int nPriority)
        {
            nPriority = 0;
            if (!cFngr.IsValid())
            {
                return(false);
            }

            int nResult = 0;

            nResult += cFngr.Fret;

            if (fCapo)
            {
                nResult -= 10; // TODO: Change to be constants.
            }
            else
            {
                switch (cFngr.String)
                {
                case EString.Sixth:
                case EString.Fifth:
                case EString.Fourth:
                case EString.Third:
                    nResult -= ((EString.NumberOfStrings - cFngr.String) * 2);
                    break;

                case EString.Second:
                case EString.First:
                    nResult += 10;
                    break;

                default:
                    throw new Exception("Damnit");
                }
            }

            nPriority = nResult;

            return(true);
        }
コード例 #3
0
        protected override bool GetPriorityForPlay(CFingerPosition cFngr, bool fCapo, out int nPriority)
        {
            nPriority = 0;
            if (!cFngr.IsValid())
            {
                return(false);
            }

            int nResult = 0;

            nResult += (Globals.NUMBER_OF_FRETS - cFngr.Fret);

            if (fCapo)
            {
                nResult -= 4; // TODO: Change to be constants.
            }

            switch (cFngr.String)
            {
            case EString.Sixth:
            case EString.Fifth:
            case EString.Fourth:
            case EString.Third:
                nResult += 5;
                nResult -= ((EString.NumberOfStrings - cFngr.String) / 2);
                break;

            case EString.Second:
            case EString.First:
                nResult -= (3 + (int)cFngr.String);
                break;

            default:
                return(false);
            }

            nPriority = nResult;
            return(true);
        }
コード例 #4
0
        protected override bool GetPriorityForPlay(CFingerPosition cFngr, bool fCapo, out int nPriority)
        {
            nPriority = 0;

            if (!cFngr.IsValid())
            {
                return(false);
                //throw new Exception("F**k it");
            }

            int nResult = 0;

            nResult += Globals.NUMBER_OF_FRETS - cFngr.Fret;

            nResult += ((EString.NumberOfStrings - cFngr.String) * Globals.NUMBER_OF_FRETS_IN_OCTAVE / 3); // TODO: This should be more dynamic.

            if (fCapo)
            {
                nResult += (Strings.Count / 2);
            }

            nPriority = nResult;
            return(true);
        }