There are a lot of ways that you could do this. You would be best off implementing whatever method/formula is most intuitive to you, or whatever fits in easiest with your program. But here's how I would do it:
1. Apply the reel variables to a 5x3 array
2. Make a recursive function that takes the variable present at [x,y], and checks whether the same variable is present at [x+1,y] (i.e. the reel square directly to the right). If y>0, then check whether the variable is present at [x+1,y-1] (the reel to the above-right). If y<2, then check whether the variable is present at [x+1,y+1] (the reel to the below-right). If the variable is present in any of these position, then call the same function for that position. If x+1 == 5, then congratulations - you've got a line - do whatever it is that you need and don't call the function again.
3. Call the function for [0,0], [0,1], and [0,2].
If you hate the idea of using recursive functions, then I suppose you can do a similar implementation with one or two for/while loops.