Bulls and cows: Difference between revisions
Content added Content deleted
(Added Quackery.) |
imported>Arakov |
||
Line 2,398: | Line 2,398: | ||
// check duplicates |
// check duplicates |
||
var duplicate := guess.seekEach:(x => (x == ch)&&(x.equalReference(ch).Inverted)); |
var duplicate := guess.seekEach::(x => (x == ch)&&(x.equalReference(ch).Inverted)); |
||
if (nil != duplicate) |
if (nil != duplicate) |
||
{ |
{ |
||
Line 2,422: | Line 2,422: | ||
bulls => |
bulls => |
||
-1 { console.printLine |
-1 { console.printLine("Not a valid guess."); ^ true } |
||
4 { console.printLine |
4 { console.printLine("Congratulations! You have won!"); ^ false } |
||
! { |
|||
_attempt.append(1); |
_attempt.append(1); |
||