refactored computer guesser to new class