Small optimization.

Modified isWinningPath() to use an int instead of an array.