From Behrman House:
iCodeMaster is the best original free version of MasterMind for your iPhone or iPod Touch and the only version that allows you to generate the secret code.
Play by yourself: The iPhone/iPod Touch MasterMind randomly creates a secret code and your goal is to solve the code in ten or fewer attempts. Touch the holes to bring up a ball selector, then touch the ball color to fill the holes with your code guess. Use the result pegs to help formulate your guesses. The result pegs indicate the number of balls that are the correct color and in the correct position.
Play with someone else: Become the iCodeMaster by making your own code and trying to stump your family and friends. Make your own code by touching each ball with the ball selector. When you are done, touch lock and challenge someone to guess your code. After they have completed your code, have them become the iCodeMaster and try to solve their code in fewer turns.