For our second project, creating an interactive image in processing using various programming concepts, I created a variation of the kid’s game Mastermind. This involved input, for loops, variables, random numbers, functions, and conditionals.
Instructions:
– In this version there are 6 colors: white, green, red, teal, yellow, and magenta.
– Click on a box in the current row to cycle through the colors.
– The answer will be some set of 3 colors and a given color can repeat (example: teal, teal white or red, yellow, green). – When you are satisfied with your guess press the guess button.
-The two circles above each square may be filled blue based on your results. No circles colored above the square means that the color does not appear in the correct sequence, the first circle colored means that the color is in the sequence but not in that location (this does not indicate how many of that color are in the sequence. If the answer is red, yellow, yellow and you guess red,red,green than the first box will have two filled and the second will have one filled even though you already guessed the only red in the sequence).
– If your guess is correct a smiley face will show up at the bottom. If it is not correct a new row will show up for you to guess with unless you have guessed 5 times.
– Previous rows stay there for you to see what you have already guessed.
– If you have guessed 5 times without winning a frowning face will show up at the bottom indicating that you lost the game.
– After one game is finished (win or loss) you can click anywhere to start a new game.
– The answer is randomly generated each time.
EDIT, PLEASE NOTE: For some reason right now the game isn’t working here even though it works when I run it in processing. I am going to look into this