Added check for player hasWon