Black box: Difference between revisions
m
Automated syntax highlighting fixup (second round - minor fixes)
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Thundergnat (talk | contribs) m (Automated syntax highlighting fixup (second round - minor fixes)) |
||
Line 12:
-More or less atoms (maybe random)<br />
-Different grid sizes
=={{header|AutoHotkey}}==
<syntaxhighlight lang=
;--------------------------------------------------------------------------------------
BoardSize := 8
Line 264 ⟶ 263:
return
;--------------------------------------------------------------------------------------</syntaxhighlight>
=={{header|Go}}==
Terminal based game.
Line 273 ⟶ 271:
Set wikiGame to false to play a normal 'random' game.
<syntaxhighlight lang="go">package main
import (
Line 722 ⟶ 720:
Play again y/n : n
</pre>
=={{header|J}}==
Requires a recent (release 9) jqt:<syntaxhighlight lang=
coinsert'jgl2'
Line 822 ⟶ 819:
}}</syntaxhighlight>
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.
=={{header|JavaScript}}==
Play it [http://paulo-jorente.de/tests/blackbox/ here].
<syntaxhighlight lang="javascript">
var sel, again, check, score, done, atoms, guesses, beamCnt, brdSize;
Line 1,034 ⟶ 1,030:
}
</syntaxhighlight>
=={{header|Julia}}==
Gtk library GUI version.
<syntaxhighlight lang="julia">using Colors, Cairo, Graphics, Gtk
struct BoxPosition
Line 1,276 ⟶ 1,271:
blackboxapp()
</syntaxhighlight>
=={{header|Nim}}==
{{trans|Go}}
<syntaxhighlight lang=
const WikiGame = true
Line 1,745 ⟶ 1,739:
Play again (y/n): n</pre>
=={{header|Phix}}==
{{libheader|Phix/pGUI}}
A configurable GUI version of the Black Box game, with a Knuth solver/helper.
<syntaxhighlight lang=
constant title = "Black Box",
help_text = """
Line 2,518 ⟶ 2,511:
main()</syntaxhighlight>
=={{header|Wren}}==
{{trans|Go}}
Line 2,524 ⟶ 2,516:
{{libheader|Wren-ioutil}}
{{libheader|Wren-str}}
<syntaxhighlight lang="ecmascript">import "random" for Random
import "/fmt" for Fmt
import "/ioutil" for Input
Line 3,013 ⟶ 3,005:
Play again y/n : n
</pre>
=={{header|zkl}}==
{{trans|Go}}
<syntaxhighlight lang="zkl">const ATM="A", F="F", HIT="H", G="G", GN="N", R="R", BLNK=" ", GY="Y";
var
|