Black box: Difference between revisions
m
syntax highlighting fixup automation
m (→{{header|J}}: 10) |
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
||
Line 14:
=={{header|AutoHotkey}}==
<
;--------------------------------------------------------------------------------------
BoardSize := 8
Line 263:
Gui, show,, % TroubleShooting ? "Black Box - TroubleShooting Mode" : "Black Box"
return
;--------------------------------------------------------------------------------------</
=={{header|Go}}==
Line 273:
Set wikiGame to false to play a normal 'random' game.
<
import (
Line 555:
check(scanner.Err())
}
}</
{{out}}
Line 724:
=={{header|J}}==
Requires a recent (release 9) jqt:<
coinsert'jgl2'
Line 820:
wd 'set finish enable ',":FINISHED<GUESSES=&#ATOMS
glpaint''
}}</
Example use: <syntaxhighlight lang
Or, for 10 atoms in a 15x15 grid: <syntaxhighlight lang
This version allows the user to place and observe individual beams after finishing a game.
Line 830:
=={{header|JavaScript}}==
Play it [http://paulo-jorente.de/tests/blackbox/ here].
<
var sel, again, check, score, done, atoms, guesses, beamCnt, brdSize;
Line 1,033:
startGame();
}
</syntaxhighlight>
=={{header|Julia}}==
Gtk library GUI version.
<
struct BoxPosition
Line 1,275:
blackboxapp()
</syntaxhighlight>
=={{header|Nim}}==
{{trans|Go}}
<
const WikiGame = true
Line 1,502:
of "y": break
main()</
{{out}}
Line 1,749:
{{libheader|Phix/pGUI}}
A configurable GUI version of the Black Box game, with a Knuth solver/helper.
<
constant title = "Black Box",
help_text = """
Line 2,517:
end procedure
main()</
=={{header|Wren}}==
Line 2,524:
{{libheader|Wren-ioutil}}
{{libheader|Wren-str}}
<
import "/fmt" for Fmt
import "/ioutil" for Input
Line 2,769:
var yn = Str.lower(Input.option(" Play again y/n : ", "ynYN"))
if (yn == "n") return
}</
{{out}}
Line 3,016:
=={{header|zkl}}==
{{trans|Go}}
<
var
Line 3,189:
else if(yn=="y") break(1);
}
}</
Showing [results of] most of the Wikipedia actions:
{{out}}
|