added unit tests and refactored game-won?