Setup jasmine and write a test
Refactor hasWon() into smaller methods