basic mastermind logic working