Beispiel #1
0
        private int?MoveDown(int currentNo, List <int> sequence)
        {
            int?nextNo = currentNo;

            do
            {
                nextNo = Keypad.DownOf(nextNo.Value);
                if (nextNo.HasValue && !sequence.Contains(nextNo.Value))
                {
                    break;
                }
            }while (nextNo.HasValue);

            return(nextNo);
        }
Beispiel #2
0
        private int?MoveLeftDown(int currentNo, List <int> sequence)
        {
            int?nextNo = Keypad.LeftOf(currentNo);

            if (nextNo.HasValue)
            {
                nextNo = Keypad.DownOf(nextNo.Value);
                if (nextNo.HasValue && sequence.Contains(nextNo.Value))
                {
                    nextNo = null;
                }
            }

            return(nextNo);
        }
Beispiel #3
0
        private int?MoveDownRight(int currentNo, List <int> sequence)
        {
            int?nextNo = Keypad.DownOf(currentNo);

            if (nextNo.HasValue)
            {
                nextNo = Keypad.DownOf(nextNo.Value);
                if (nextNo.HasValue)
                {
                    nextNo = Keypad.RightOf(nextNo.Value);
                    if (nextNo.HasValue && !sequence.Contains(nextNo.Value))
                    {
                        return(nextNo);
                    }
                }
            }

            return(null);
        }