mmind←{             ⍝ Mastermind or "cows and bulls".
    '*'∨.≠(⍴⍵)↑⎕←'*+'/⍨⍵{(⍺+.=⍵),⍺{+/⊃⌊/+/¨(⊂∪⍺)∘.=¨(⍺≠⍵)∘/¨⍺ ⍵}⍵}⍞:∇ ⍵
}
code_colours

test script

Back to: notes

Back to: Workspaces