diff options
Diffstat (limited to 'html/chessboard.mu.html')
-rw-r--r-- | html/chessboard.mu.html | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/html/chessboard.mu.html b/html/chessboard.mu.html index a598c8f7..7129dfea 100644 --- a/html/chessboard.mu.html +++ b/html/chessboard.mu.html @@ -134,10 +134,10 @@ if ('onhashchange' in window) { <span id="L70" class="LineNr"> 70 </span> <span class="Constant">load-ingredients</span> <span id="L71" class="LineNr"> 71 </span> board:board <span class="Special"><-</span> <a href='chessboard.mu.html#L179'>initial-position</a> <span id="L72" class="LineNr"> 72 </span> <span class="Comment"># hook up stdin</span> -<span id="L73" class="LineNr"> 73 </span> stdin-in:&:source:char, stdin-out:&:sink:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">10/capacity</span> +<span id="L73" class="LineNr"> 73 </span> stdin-in:&:<a href='075channel.mu.html#L43'>source</a>:char, stdin-out:&:<a href='075channel.mu.html#L47'>sink</a>:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">10/capacity</span> <span id="L74" class="LineNr"> 74 </span> start-running <a href='084console.mu.html#L73'>send-keys-to-channel</a>, <a href='084console.mu.html#L23'>console</a>, stdin-out, <a href='081print.mu.html#L4'>screen</a> <span id="L75" class="LineNr"> 75 </span> <span class="Comment"># buffer lines in stdin</span> -<span id="L76" class="LineNr"> 76 </span> buffered-stdin-in:&:source:char, buffered-stdin-out:&:sink:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">10/capacity</span> +<span id="L76" class="LineNr"> 76 </span> buffered-stdin-in:&:<a href='075channel.mu.html#L43'>source</a>:char, buffered-stdin-out:&:<a href='075channel.mu.html#L47'>sink</a>:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">10/capacity</span> <span id="L77" class="LineNr"> 77 </span> start-running <a href='075channel.mu.html#L388'>buffer-lines</a>, stdin-in, buffered-stdin-out <span id="L78" class="LineNr"> 78 </span> <span class="Delimiter">{</span> <span id="L79" class="LineNr"> 79 </span> <span class="Conceal">¦</span> print <a href='081print.mu.html#L4'>screen</a>, <span class="Constant">[Stupid text-mode chessboard. White pieces in uppercase; black pieces in lowercase. No checking for legal moves.</span> @@ -298,7 +298,7 @@ if ('onhashchange' in window) { <span id="L234" class="LineNr">234 </span>] <span id="L235" class="LineNr">235 </span> <span id="L236" class="LineNr">236 </span><span class="Comment"># prints only error messages to screen</span> -<span id="L237" class="LineNr">237 </span><span class="muRecipe">def</span> <a href='chessboard.mu.html#L237'>read-move</a> stdin:&:source:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>result:&:<a href='chessboard.mu.html#L228'>move</a>, quit?:bool, error?:bool, stdin:&:source:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ +<span id="L237" class="LineNr">237 </span><span class="muRecipe">def</span> <a href='chessboard.mu.html#L237'>read-move</a> stdin:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>result:&:<a href='chessboard.mu.html#L228'>move</a>, quit?:bool, error?:bool, stdin:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ <span id="L238" class="LineNr">238 </span> <span class="Constant">local-scope</span> <span id="L239" class="LineNr">239 </span> <span class="Constant">load-ingredients</span> <span id="L240" class="LineNr">240 </span> from-file:num, quit?:bool, error?:bool <span class="Special"><-</span> <a href='chessboard.mu.html#L265'>read-file</a> stdin, <a href='081print.mu.html#L4'>screen</a> @@ -326,7 +326,7 @@ if ('onhashchange' in window) { <span id="L262" class="LineNr">262 </span>] <span id="L263" class="LineNr">263 </span> <span id="L264" class="LineNr">264 </span><span class="Comment"># valid values for file: 0-7</span> -<span id="L265" class="LineNr">265 </span><span class="muRecipe">def</span> <a href='chessboard.mu.html#L265'>read-file</a> stdin:&:source:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>file:num, quit:bool, error:bool, stdin:&:source:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ +<span id="L265" class="LineNr">265 </span><span class="muRecipe">def</span> <a href='chessboard.mu.html#L265'>read-file</a> stdin:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>file:num, quit:bool, error:bool, stdin:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ <span id="L266" class="LineNr">266 </span> <span class="Constant">local-scope</span> <span id="L267" class="LineNr">267 </span> <span class="Constant">load-ingredients</span> <span id="L268" class="LineNr">268 </span> c:char, eof?:bool, stdin <span class="Special"><-</span> read stdin @@ -373,7 +373,7 @@ if ('onhashchange' in window) { <span id="L309" class="LineNr">309 </span>] <span id="L310" class="LineNr">310 </span> <span id="L311" class="LineNr">311 </span><span class="Comment"># valid values for rank: 0-7</span> -<span id="L312" class="LineNr">312 </span><span class="muRecipe">def</span> <a href='chessboard.mu.html#L312'>read-rank</a> stdin:&:source:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>rank:num, quit?:bool, error?:bool, stdin:&:source:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ +<span id="L312" class="LineNr">312 </span><span class="muRecipe">def</span> <a href='chessboard.mu.html#L312'>read-rank</a> stdin:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>rank:num, quit?:bool, error?:bool, stdin:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ <span id="L313" class="LineNr">313 </span> <span class="Constant">local-scope</span> <span id="L314" class="LineNr">314 </span> <span class="Constant">load-ingredients</span> <span id="L315" class="LineNr">315 </span> c:char, eof?:bool, stdin <span class="Special"><-</span> read stdin @@ -415,7 +415,7 @@ if ('onhashchange' in window) { <span id="L351" class="LineNr">351 </span> <span id="L352" class="LineNr">352 </span><span class="Comment"># read a character from the given channel and check that it's what we expect</span> <span id="L353" class="LineNr">353 </span><span class="Comment"># return true on error</span> -<span id="L354" class="LineNr">354 </span><span class="muRecipe">def</span> <a href='chessboard.mu.html#L354'>expect-from-channel</a> stdin:&:source:char, expected:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>result:bool, stdin:&:source:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ +<span id="L354" class="LineNr">354 </span><span class="muRecipe">def</span> <a href='chessboard.mu.html#L354'>expect-from-channel</a> stdin:&:<a href='075channel.mu.html#L43'>source</a>:char, expected:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a><span class="muRecipe"> -> </span>result:bool, stdin:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> [ <span id="L355" class="LineNr">355 </span> <span class="Constant">local-scope</span> <span id="L356" class="LineNr">356 </span> <span class="Constant">load-ingredients</span> <span id="L357" class="LineNr">357 </span> c:char, eof?:bool, stdin <span class="Special"><-</span> read stdin @@ -431,8 +431,8 @@ if ('onhashchange' in window) { <span id="L367" class="LineNr">367 </span><span class="muScenario">scenario</span> read-move-blocking [ <span id="L368" class="LineNr">368 </span> <span class="Constant">local-scope</span> <span id="L369" class="LineNr">369 </span> assume-screen <span class="Constant">20/width</span>, <span class="Constant">2/height</span> -<span id="L370" class="LineNr">370 </span> source:&:source:char, sink:&:sink:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> -<span id="L371" class="LineNr">371 </span> read-move-routine:num/routine <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, source, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> +<span id="L370" class="LineNr">370 </span> <a href='075channel.mu.html#L43'>source</a>:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='075channel.mu.html#L47'>sink</a>:&:<a href='075channel.mu.html#L47'>sink</a>:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> +<span id="L371" class="LineNr">371 </span> read-move-routine:num/routine <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, <a href='075channel.mu.html#L43'>source</a>, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> <span id="L372" class="LineNr">372 </span> run [ <span id="L373" class="LineNr">373 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' is waiting for input</span> <span id="L374" class="LineNr">374 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -441,7 +441,7 @@ if ('onhashchange' in window) { <span id="L377" class="LineNr">377 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L378" class="LineNr">378 </span><span class="Constant">F read-move-blocking: routine failed to pause after coming up (before any keys were pressed)]</span> <span id="L379" class="LineNr">379 </span> <span class="Conceal">¦</span> <span class="Comment"># press 'a'</span> -<span id="L380" class="LineNr">380 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">97/a</span> +<span id="L380" class="LineNr">380 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">97/a</span> <span id="L381" class="LineNr">381 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L382" class="LineNr">382 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' still waiting for input</span> <span id="L383" class="LineNr">383 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -450,7 +450,7 @@ if ('onhashchange' in window) { <span id="L386" class="LineNr">386 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L387" class="LineNr">387 </span><span class="Constant">F read-move-blocking: routine failed to pause after rank 'a']</span> <span id="L388" class="LineNr">388 </span> <span class="Conceal">¦</span> <span class="Comment"># press '2'</span> -<span id="L389" class="LineNr">389 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">50/'2'</span> +<span id="L389" class="LineNr">389 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">50/'2'</span> <span id="L390" class="LineNr">390 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L391" class="LineNr">391 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' still waiting for input</span> <span id="L392" class="LineNr">392 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -459,7 +459,7 @@ if ('onhashchange' in window) { <span id="L395" class="LineNr">395 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L396" class="LineNr">396 </span><span class="Constant">F read-move-blocking: routine failed to pause after file 'a2']</span> <span id="L397" class="LineNr">397 </span> <span class="Conceal">¦</span> <span class="Comment"># press '-'</span> -<span id="L398" class="LineNr">398 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">45/'-'</span> +<span id="L398" class="LineNr">398 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">45/'-'</span> <span id="L399" class="LineNr">399 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L400" class="LineNr">400 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' still waiting for input</span> <span id="L401" class="LineNr">401 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -468,7 +468,7 @@ if ('onhashchange' in window) { <span id="L404" class="LineNr">404 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L405" class="LineNr">405 </span><span class="Constant">F read-move-blocking: routine failed to pause after hyphen 'a2-']</span> <span id="L406" class="LineNr">406 </span> <span class="Conceal">¦</span> <span class="Comment"># press 'a'</span> -<span id="L407" class="LineNr">407 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">97/a</span> +<span id="L407" class="LineNr">407 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">97/a</span> <span id="L408" class="LineNr">408 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L409" class="LineNr">409 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' still waiting for input</span> <span id="L410" class="LineNr">410 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -477,7 +477,7 @@ if ('onhashchange' in window) { <span id="L413" class="LineNr">413 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L414" class="LineNr">414 </span><span class="Constant">F read-move-blocking: routine failed to pause after rank 'a2-a']</span> <span id="L415" class="LineNr">415 </span> <span class="Conceal">¦</span> <span class="Comment"># press '4'</span> -<span id="L416" class="LineNr">416 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">52/'4'</span> +<span id="L416" class="LineNr">416 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">52/'4'</span> <span id="L417" class="LineNr">417 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L418" class="LineNr">418 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' still waiting for input</span> <span id="L419" class="LineNr">419 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -486,7 +486,7 @@ if ('onhashchange' in window) { <span id="L422" class="LineNr">422 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L423" class="LineNr">423 </span><span class="Constant">F read-move-blocking: routine failed to pause after file 'a2-a4']</span> <span id="L424" class="LineNr">424 </span> <span class="Conceal">¦</span> <span class="Comment"># press 'newline'</span> -<span id="L425" class="LineNr">425 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink,<span class="Constant"> 10</span> <span class="Comment"># newline</span> +<span id="L425" class="LineNr">425 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>,<span class="Constant"> 10</span> <span class="Comment"># newline</span> <span id="L426" class="LineNr">426 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L427" class="LineNr">427 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' now completes</span> <span id="L428" class="LineNr">428 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -504,8 +504,8 @@ if ('onhashchange' in window) { <span id="L440" class="LineNr">440 </span><span class="muScenario">scenario</span> read-move-quit [ <span id="L441" class="LineNr">441 </span> <span class="Constant">local-scope</span> <span id="L442" class="LineNr">442 </span> assume-screen <span class="Constant">20/width</span>, <span class="Constant">2/height</span> -<span id="L443" class="LineNr">443 </span> source:&:source:char, sink:&:sink:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> -<span id="L444" class="LineNr">444 </span> read-move-routine:num <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, source, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> +<span id="L443" class="LineNr">443 </span> <a href='075channel.mu.html#L43'>source</a>:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='075channel.mu.html#L47'>sink</a>:&:<a href='075channel.mu.html#L47'>sink</a>:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> +<span id="L444" class="LineNr">444 </span> read-move-routine:num <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, <a href='075channel.mu.html#L43'>source</a>, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> <span id="L445" class="LineNr">445 </span> run [ <span id="L446" class="LineNr">446 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' is waiting for input</span> <span id="L447" class="LineNr">447 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -514,7 +514,7 @@ if ('onhashchange' in window) { <span id="L450" class="LineNr">450 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L451" class="LineNr">451 </span><span class="Constant">F read-move-quit: routine failed to pause after coming up (before any keys were pressed)]</span> <span id="L452" class="LineNr">452 </span> <span class="Conceal">¦</span> <span class="Comment"># press 'q'</span> -<span id="L453" class="LineNr">453 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">113/q</span> +<span id="L453" class="LineNr">453 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">113/q</span> <span id="L454" class="LineNr">454 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L455" class="LineNr">455 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' completes</span> <span id="L456" class="LineNr">456 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -532,8 +532,8 @@ if ('onhashchange' in window) { <span id="L468" class="LineNr">468 </span><span class="muScenario">scenario</span> read-move-illegal-file [ <span id="L469" class="LineNr">469 </span> <span class="Constant">local-scope</span> <span id="L470" class="LineNr">470 </span> assume-screen <span class="Constant">20/width</span>, <span class="Constant">2/height</span> -<span id="L471" class="LineNr">471 </span> source:&:source:char, sink:&:sink:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> -<span id="L472" class="LineNr">472 </span> read-move-routine:num <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, source, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> +<span id="L471" class="LineNr">471 </span> <a href='075channel.mu.html#L43'>source</a>:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='075channel.mu.html#L47'>sink</a>:&:<a href='075channel.mu.html#L47'>sink</a>:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> +<span id="L472" class="LineNr">472 </span> read-move-routine:num <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, <a href='075channel.mu.html#L43'>source</a>, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> <span id="L473" class="LineNr">473 </span> run [ <span id="L474" class="LineNr">474 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' is waiting for input</span> <span id="L475" class="LineNr">475 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -541,7 +541,7 @@ if ('onhashchange' in window) { <span id="L477" class="LineNr">477 </span> <span class="Conceal">¦</span> waiting?:bool <span class="Special"><-</span> not-equal read-move-state, <span class="Constant">2/discontinued</span> <span id="L478" class="LineNr">478 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L479" class="LineNr">479 </span><span class="Constant">F read-move-illegal-file: routine failed to pause after coming up (before any keys were pressed)]</span> -<span id="L480" class="LineNr">480 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">50/'2'</span> +<span id="L480" class="LineNr">480 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">50/'2'</span> <span id="L481" class="LineNr">481 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L482" class="LineNr">482 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine <span id="L483" class="LineNr">483 </span> ] @@ -554,8 +554,8 @@ if ('onhashchange' in window) { <span id="L490" class="LineNr">490 </span><span class="muScenario">scenario</span> read-move-illegal-rank [ <span id="L491" class="LineNr">491 </span> <span class="Constant">local-scope</span> <span id="L492" class="LineNr">492 </span> assume-screen <span class="Constant">20/width</span>, <span class="Constant">2/height</span> -<span id="L493" class="LineNr">493 </span> source:&:source:char, sink:&:sink:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> -<span id="L494" class="LineNr">494 </span> read-move-routine:num <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, source, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> +<span id="L493" class="LineNr">493 </span> <a href='075channel.mu.html#L43'>source</a>:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='075channel.mu.html#L47'>sink</a>:&:<a href='075channel.mu.html#L47'>sink</a>:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> +<span id="L494" class="LineNr">494 </span> read-move-routine:num <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, <a href='075channel.mu.html#L43'>source</a>, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> <span id="L495" class="LineNr">495 </span> run [ <span id="L496" class="LineNr">496 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' is waiting for input</span> <span id="L497" class="LineNr">497 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -563,8 +563,8 @@ if ('onhashchange' in window) { <span id="L499" class="LineNr">499 </span> <span class="Conceal">¦</span> waiting?:bool <span class="Special"><-</span> not-equal read-move-state, <span class="Constant">2/discontinued</span> <span id="L500" class="LineNr">500 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L501" class="LineNr">501 </span><span class="Constant">F read-move-illegal-rank: routine failed to pause after coming up (before any keys were pressed)]</span> -<span id="L502" class="LineNr">502 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">97/a</span> -<span id="L503" class="LineNr">503 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">97/a</span> +<span id="L502" class="LineNr">502 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">97/a</span> +<span id="L503" class="LineNr">503 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">97/a</span> <span id="L504" class="LineNr">504 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L505" class="LineNr">505 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine <span id="L506" class="LineNr">506 </span> ] @@ -577,8 +577,8 @@ if ('onhashchange' in window) { <span id="L513" class="LineNr">513 </span><span class="muScenario">scenario</span> read-move-empty [ <span id="L514" class="LineNr">514 </span> <span class="Constant">local-scope</span> <span id="L515" class="LineNr">515 </span> assume-screen <span class="Constant">20/width</span>, <span class="Constant">2/height</span> -<span id="L516" class="LineNr">516 </span> source:&:source:char, sink:&:sink:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> -<span id="L517" class="LineNr">517 </span> read-move-routine:num <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, source, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> +<span id="L516" class="LineNr">516 </span> <a href='075channel.mu.html#L43'>source</a>:&:<a href='075channel.mu.html#L43'>source</a>:char, <a href='075channel.mu.html#L47'>sink</a>:&:<a href='075channel.mu.html#L47'>sink</a>:char <span class="Special"><-</span> <a href='075channel.mu.html#L51'>new-channel</a> <span class="Constant">2/capacity</span> +<span id="L517" class="LineNr">517 </span> read-move-routine:num <span class="Special"><-</span> start-running <a href='chessboard.mu.html#L237'>read-move</a>, <a href='075channel.mu.html#L43'>source</a>, <a href='081print.mu.html#L4'>screen</a>:&:<a href='081print.mu.html#L4'>screen</a> <span id="L518" class="LineNr">518 </span> run [ <span id="L519" class="LineNr">519 </span> <span class="Conceal">¦</span> <span class="Comment"># 'read-move' is waiting for input</span> <span id="L520" class="LineNr">520 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine @@ -586,8 +586,8 @@ if ('onhashchange' in window) { <span id="L522" class="LineNr">522 </span> <span class="Conceal">¦</span> waiting?:bool <span class="Special"><-</span> not-equal read-move-state, <span class="Constant">2/discontinued</span> <span id="L523" class="LineNr">523 </span> <span class="Conceal">¦</span> assert waiting?, <span class="Constant">[ </span> <span id="L524" class="LineNr">524 </span><span class="Constant">F read-move-empty: routine failed to pause after coming up (before any keys were pressed)]</span> -<span id="L525" class="LineNr">525 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">10/newline</span> -<span id="L526" class="LineNr">526 </span> <span class="Conceal">¦</span> sink <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> sink, <span class="Constant">97/a</span> +<span id="L525" class="LineNr">525 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">10/newline</span> +<span id="L526" class="LineNr">526 </span> <span class="Conceal">¦</span> <a href='075channel.mu.html#L47'>sink</a> <span class="Special"><-</span> <a href='075channel.mu.html#L66'>write</a> <a href='075channel.mu.html#L47'>sink</a>, <span class="Constant">97/a</span> <span id="L527" class="LineNr">527 </span> <span class="Conceal">¦</span> restart read-move-routine <span id="L528" class="LineNr">528 </span> <span class="Conceal">¦</span> wait-for-routine-to-block read-move-routine <span id="L529" class="LineNr">529 </span> ] |