Mastermind is a fun game that involves trying to break a random code of five numbers (1-9) in fifteen guesses or less. To help assist you with the code-breaking, a clue is displayed below each number. If the number is correct and in the right position, a star (*) will be displayed. If the number is correct but in the wrong position, a plus (+) will be displayed. And if the number is simply wrong, a minus (-) will be displayed. Try out the game and try to understand and think through the code.

The Code

:Repeat Ans=105 and 5=dim(L2
:Repeat Ans
:If Ans=22
:Goto Q
:If Ans=45
:ClrList L2
:If Ans=23 and dim(L2
:If 5>dim(L2) and 2>abs(5-abs(5-abs(Ans-83
:" // 1 space
:rand(E2  // scientific E ([2nd][,])
:If not(min(L2=L1
:Disp sub("FAIL!WIN! ",1+5(X<16),5
:Lbl Q

Related Games


Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.