Optimized.

Optimized slightly. No longer builds remainder of path if winning
condition is reached.