From UBC Wiki


Authors: Laura Barton, JM Messham

What is the problem?

We will be making an interactive version of the game Mastermind, where the computer will come up with a four-symbol "code" and the user will try to guess it. The computer will give feedback on which guesses are correct in both colour and position, vs those that are correct in colour only.

What is the something extra?

We added two extras: a graphical representation of the secret code on game end, and error handling so that typos in the user input do not crash the game.

What did we learn from doing this?

We learned about error handling in Haskell, which are basically catch blocks on the lines of a do block. We also learned about the gloss library, and how to use it in conjunction with our already functioning game in order to display simple vector images.