Implemented generator that satisfies the specifications. Added secret number validation.