To learn recursion is simple to do: just learn recursion.

The winner method is called with a specific value for n. If it isn't one (i.e. the winning position) it calls itself with n minus one, and uses the result from that to calculate teh winning position.

If you understand how recursion works, it's pretty clear.

So grab the debugger, and follow the code through. It's worth making a quick change first. Change this:

`return (winner(n-1)+1)%n+1;`

to this:

{ int res = winner(n-1); res = res + 1; res = res % n + 1; return res; }That way, you can follow exactly what is being done (and returned) at each stage.