Refactoring check for winner.