Q:

Minigolf Solitaire

Inspired by this question on the puzzling stack exchange. 
Rules
Given 5 stacks of 5 cards with numbers from 1 to 7, output the moves needed to empty all stacks. A move is defined as the index of a column to pull the card off of, and a move is only valid if:

The stack is non-empty 
The value of the card at the top of the stack is exactly 1 lower or higher than the value of the last card removed from any of the stacks. Note 1 and 7 wrap. 

Input
This challenge has loose input rules. You can use any format as input for the 25 numbers so long as the input is unambiguous among all possible inputs. The same token must be used for every instance of a card's representation. That is, if you use 2 to represent a 2, you must use that everywhere in your input. But you may use 2 to represent 2 and 532jv4q0fvq!@$$@VQea to represent 3 if this is somehow beneficial.
Output
The list of moves needed to empty all stacks without getting stuck. This format is also loose, but it needs to represent a list of indices, where 0 is the leftmost stack. 
Your program may assume that the input provided is solvable. That is, you may have undefined behaviour in the case of unsolvable input.
Note: If the input has multiple possible solutions, outputting at least 1 valid solution is acceptable 
Example/Test Case explained
Input: Representing the 5 stacks, where stack one is 5,5,3,2,6 with 5 being the top of the stack. Likewise for the other 4 stacks. Again, as stated in the question, this input format is loose and can be changed to facilitate the answer
5 5 3 2 6
2 4 1 7 7
4 2 7 1 3
2 3 3 1 4
4 6 5 5 1

Output: List of moves representing the order in which the cards are pulled off the stacks. I'll explain the result of the first 3 moves. The first 3 pops 2 off of the 4th stack (2 3 3 1 4 stack). The second 3 pops 3 off of the same stack. And then the 1 pops the 2 off of the 2nd stack. If you follow these moves on the input you will end up with empty stacks
[3, 3, 1, 3, 1, 0, 4, 0, 4, 4, 2, 0, 2, 1, 1, 3, 2, 2, 0, 2, 3, 4, 0, 1, 4]

A:

JavaScript (V8), 86 bytes
This version is similar to the other one but takes advantage of the loose input format.
The cards are expected as follows:
\$[\text{Ace}, 2, 3, 4, 5, 6, 7] = [ 16, 37, 31, 91, 44, 41, 1 ]\$
f=(a,p,o='')=>o[24]?print(o):a.map((c,i)=>(v=c.pop())&&c.push((p^v)%3?v|f(a,v,o+i):v))

Try it online!
How?
The numbers \$a_n\$ representing the card values were chosen in such a way that:

\$a_i \bmod 3\neq0\$ for any \$i\in[1..7]\$
\$(a_i \operatorname{xor} a_j)\bmod 3\neq0\$ for any \$i,j\in[1..7]\$ iff the \$i\$-th and \$j\$-th cards are consecutive

Example:
Here is what we get for an Ace (\$v=16\$):
 previous card |     p     | p xor 16 | (p xor 16) mod 3
---------------+-----------+----------+------------------
     none      | undefined |    16    |        1
      ace      |     16    |     0    |        0
       2       |     37    |    53    |        2
       3       |     31    |    15    |        0
       4       |     91    |    75    |        0
       5       |     44    |    60    |        0
       6       |     41    |    57    |        0
       7       |      1    |    17    |        2

JavaScript (V8),  105 ... 92  91 bytes
Takes input as an array of 5 columns with 1-indexed cards (Ace = 1, Two = 2, etc.). Prints all solutions as strings of 0-indexed columns.
f=(a,p,o='')=>o[24]?print(o):a.map((c,i)=>(v=c.pop())&&c.push((p-~v*6)%7%5?v:v|f(a,v,o+i)))

Try it online!
How?
Given the previous card \$p\$ and the current card \$v\$, we compute:
$$k=((p+(v+1)\times6) \bmod 7) \bmod 5$$
The cards are consecutive iff \$k=0\$.
$$
\begin{array}{c|ccccccc}
&1&2&3&4&5&6&7\\
\hline
1&1&0&4&3&2&1&0\\
2&0&1&0&4&3&2&1\\
3&1&0&1&0&4&3&2\\
4&2&1&0&1&0&4&3\\
5&3&2&1&0&1&0&4\\
6&4&3&2&1&0&1&0\\
7&0&4&3&2&1&0&1\\
\end{array}
$$
We could, in theory, use \$v+(p+1)\times 6\$ just as well. But in the JS implementation, we want the result to be NaN (falsy) if \$p\$ is undefined (first iteration), which is why the bitwise operation (-~v) may only be applied to \$v\$.
Commented
f = (                  // f is a recursive function taking:
  a,                   //   a[] = input
  p,                   //   p = previous card (initially undefined)
  o = ''               //   o = solution
) =>                   //
  o[24] ?              // if o has 25 characters:
    print(o)           //   we have a complete solution: print it
  :                    // else:
    a.map((c, i) =>    //   for each column c at position i in a[]:
      (v = c.pop())    //     pop the last card v from this column
      &&               //     abort if it's undefined
      c.push(          //     otherwise:
        (p - ~v * 6)   //       use our magic formula
        % 7 % 5 ?      //       if it's not equal to 0 or NaN:
          v            //         just push v back
        :              //       else:
          v |          //         because v belongs to the global scope,
                       //         we need to use its current value right away
          f(           //         do a recursive call to f:
            a,         //           pass a[]
            v,         //           set p = v
            o + i      //           append i to o
          )            //         end of recursive call
      )                //     end of push()
    )                  //   end of map()

A:

Jelly,  31  28 bytes
The 31 byte answer:
ṖÞZṪs5J€Ƒ
ŒṪŒ!ÇƇðœịIA%5=1ẠðƇḢZḢ

Accepts the stacks as a list of lists, [s1, s2, s3, s4, s5] where each stack has the first playable card on its left; returns a list of the 1-indexed stacks to from which to play, left to be played first.
Get a list of all ways by replacing ḢZḢ with Ḣ€€.
Since this is way too inefficient for a 5 by 5...
Try a 3 by 3 version online! (5 replaced by 3 in the code)
- this still takes ~45s and the code is \$O(n^2!)\$.
How?
ṖÞZṪs5J€Ƒ - Link 1: check each stack used in order: list [[stackIndex1, cardIndex1],...]
 Þ        - sort by:
Ṗ         -   pop (i.e. sort by stackIndex values)
  Z       - transpose -> [[1,1,1,1,1,2,2,...,4,4,5,5,5,5,5], cardIndicesSortedByStack]
   Ṫ      - tail -> cardIndicesSortedByStack
    s5    - split into chunks of five - i.e. split up by stacks
        Ƒ - invariant under?:
       €  -   for each:
      J   -     range of length (i.e. equals [[1,2,3,4,5],[1,2,3,4,5],...]?)

ŒṪŒ!ÇƇðœịIA%5=1ẠðƇḢZḢ - Main Link: list of lists of integers, M
ŒṪ                    - truthy multi-dimensional indices
  Œ!                  - all permutations
     Ƈ                - filter keep those for which:
    Ç                 -   call last Link (1) as a monad
                 Ƈ    - filter keep those for which:
      ð         ð     -   the dyadic chain - i.e. checkCardOrder(2d-indices, M)
       œị             -     multidimensional index into M (vectorises)
         I            -     deltas - i.e. [a,b,c,d,...]->[b-a,c-b,d-c,...]
          A           -     absolute values
           %5         -     mod five
             =1       -     equals one
               Ạ      -     all?
                  Ḣ   - head - i.e. first valid 2d-inices pemutation
                   Z  - transpose -> [stackIndices, cardIndices]
                    Ḣ - head -> stackIndices

           ...OR: Ḣ€€ - head each of each -> list of all such stackIndices

The 28 byte answer:
Using the rule You can use any format as input for the 25 numbers so long as the input is unambiguous among all possible inputs we may choose seven numbers such that a new dyadic function which accepts a list of such numbers and returns a list with 1s for adjacent neighbouring numbers and 0 for non-adjacent neighbouring numbers replaces the code IA%5=1. I chose the following:
^ƝẒ - list of numbers from [2,7,12,14,25,28,91] (mapping to [1,2,3,4,5,6,7])
 Ɲ  - neighbours
^   - XOR
  Ẓ - is prime?

Here is a table of the XOR results:
 ^ |  2  7 12 14 25 28 91
---+----------------------
 2 |  0  5 14 12 27 30 89
 7 |  5  0 11  9 30 27 92
12 | 14 11  0  2 21 16 87
14 | 12  9  2  0 23 18 85
25 | 27 30 21 23  0  5 66
28 | 30 27 16 18  5  0 71
91 | 89 92 87 85 66 71  0

And if we check primality:
^Ẓ |  2  7 12 14 25 28 91
---+----------------------
 2 |  0  1  0  0  0  0  1
 7 |  1  0  1  0  0  0  0
12 |  0  1  0  1  0  0  0
14 |  0  0  1  0  1  0  0
25 |  0  0  0  1  0  1  0
28 |  0  0  0  0  1  0  1
91 |  1  0  0  0  0  1  0

Here is the equivalent to the 3 by 3 version above

Many other mappings work with this code, e.g.:
[1, 2, 3, 4, 5, 6, 7] : [2, 5, 6, 13, 16, 37, 39]

or
[1, 2, 3, 4, 5, 6, 7] : [7, 12, 17, 18, 21, 32, 34]

