From 6c52e24e2996a77aa6297b26159003d503aef8a0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 18 Apr 2017 11:33:33 -0700 Subject: 3830 - crosslink shape-shifting containers in html --- html/chessboard.mu.html | 56 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'html/chessboard.mu.html') 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) { 70 load-ingredients 71 board:board <- initial-position 72 # hook up stdin - 73 stdin-in:&:source:char, stdin-out:&:sink:char <- new-channel 10/capacity + 73 stdin-in:&:source:char, stdin-out:&:sink:char <- new-channel 10/capacity 74 start-running send-keys-to-channel, console, stdin-out, screen 75 # buffer lines in stdin - 76 buffered-stdin-in:&:source:char, buffered-stdin-out:&:sink:char <- new-channel 10/capacity + 76 buffered-stdin-in:&:source:char, buffered-stdin-out:&:sink:char <- new-channel 10/capacity 77 start-running buffer-lines, stdin-in, buffered-stdin-out 78 { 79 ¦ print screen, [Stupid text-mode chessboard. White pieces in uppercase; black pieces in lowercase. No checking for legal moves. @@ -298,7 +298,7 @@ if ('onhashchange' in window) { 234 ] 235 236 # prints only error messages to screen -237 def read-move stdin:&:source:char, screen:&:screen -> result:&:move, quit?:bool, error?:bool, stdin:&:source:char, screen:&:screen [ +237 def read-move stdin:&:source:char, screen:&:screen -> result:&:move, quit?:bool, error?:bool, stdin:&:source:char, screen:&:screen [ 238 local-scope 239 load-ingredients 240 from-file:num, quit?:bool, error?:bool <- read-file stdin, screen @@ -326,7 +326,7 @@ if ('onhashchange' in window) { 262 ] 263 264 # valid values for file: 0-7 -265 def read-file stdin:&:source:char, screen:&:screen -> file:num, quit:bool, error:bool, stdin:&:source:char, screen:&:screen [ +265 def read-file stdin:&:source:char, screen:&:screen -> file:num, quit:bool, error:bool, stdin:&:source:char, screen:&:screen [ 266 local-scope 267 load-ingredients 268 c:char, eof?:bool, stdin <- read stdin @@ -373,7 +373,7 @@ if ('onhashchange' in window) { 309 ] 310 311 # valid values for rank: 0-7 -312 def read-rank stdin:&:source:char, screen:&:screen -> rank:num, quit?:bool, error?:bool, stdin:&:source:char, screen:&:screen [ +312 def read-rank stdin:&:source:char, screen:&:screen -> rank:num, quit?:bool, error?:bool, stdin:&:source:char, screen:&:screen [ 313 local-scope 314 load-ingredients 315 c:char, eof?:bool, stdin <- read stdin @@ -415,7 +415,7 @@ if ('onhashchange' in window) { 351 352 # read a character from the given channel and check that it's what we expect 353 # return true on error -354 def expect-from-channel stdin:&:source:char, expected:char, screen:&:screen -> result:bool, stdin:&:source:char, screen:&:screen [ +354 def expect-from-channel stdin:&:source:char, expected:char, screen:&:screen -> result:bool, stdin:&:source:char, screen:&:screen [ 355 local-scope 356 load-ingredients 357 c:char, eof?:bool, stdin <- read stdin @@ -431,8 +431,8 @@ if ('onhashchange' in window) { 367 scenario read-move-blocking [ 368 local-scope 369 assume-screen 20/width, 2/height -370 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity -371 read-move-routine:num/routine <- start-running read-move, source, screen:&:screen +370 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity +371 read-move-routine:num/routine <- start-running read-move, source, screen:&:screen 372 run [ 373 ¦ # 'read-move' is waiting for input 374 ¦ wait-for-routine-to-block read-move-routine @@ -441,7 +441,7 @@ if ('onhashchange' in window) { 377 ¦ assert waiting?, [ 378 F read-move-blocking: routine failed to pause after coming up (before any keys were pressed)] 379 ¦ # press 'a' -380 ¦ sink <- write sink, 97/a +380 ¦ sink <- write sink, 97/a 381 ¦ restart read-move-routine 382 ¦ # 'read-move' still waiting for input 383 ¦ wait-for-routine-to-block read-move-routine @@ -450,7 +450,7 @@ if ('onhashchange' in window) { 386 ¦ assert waiting?, [ 387 F read-move-blocking: routine failed to pause after rank 'a'] 388 ¦ # press '2' -389 ¦ sink <- write sink, 50/'2' +389 ¦ sink <- write sink, 50/'2' 390 ¦ restart read-move-routine 391 ¦ # 'read-move' still waiting for input 392 ¦ wait-for-routine-to-block read-move-routine @@ -459,7 +459,7 @@ if ('onhashchange' in window) { 395 ¦ assert waiting?, [ 396 F read-move-blocking: routine failed to pause after file 'a2'] 397 ¦ # press '-' -398 ¦ sink <- write sink, 45/'-' +398 ¦ sink <- write sink, 45/'-' 399 ¦ restart read-move-routine 400 ¦ # 'read-move' still waiting for input 401 ¦ wait-for-routine-to-block read-move-routine @@ -468,7 +468,7 @@ if ('onhashchange' in window) { 404 ¦ assert waiting?, [ 405 F read-move-blocking: routine failed to pause after hyphen 'a2-'] 406 ¦ # press 'a' -407 ¦ sink <- write sink, 97/a +407 ¦ sink <- write sink, 97/a 408 ¦ restart read-move-routine 409 ¦ # 'read-move' still waiting for input 410 ¦ wait-for-routine-to-block read-move-routine @@ -477,7 +477,7 @@ if ('onhashchange' in window) { 413 ¦ assert waiting?, [ 414 F read-move-blocking: routine failed to pause after rank 'a2-a'] 415 ¦ # press '4' -416 ¦ sink <- write sink, 52/'4' +416 ¦ sink <- write sink, 52/'4' 417 ¦ restart read-move-routine 418 ¦ # 'read-move' still waiting for input 419 ¦ wait-for-routine-to-block read-move-routine @@ -486,7 +486,7 @@ if ('onhashchange' in window) { 422 ¦ assert waiting?, [ 423 F read-move-blocking: routine failed to pause after file 'a2-a4'] 424 ¦ # press 'newline' -425 ¦ sink <- write sink, 10 # newline +425 ¦ sink <- write sink, 10 # newline 426 ¦ restart read-move-routine 427 ¦ # 'read-move' now completes 428 ¦ wait-for-routine-to-block read-move-routine @@ -504,8 +504,8 @@ if ('onhashchange' in window) { 440 scenario read-move-quit [ 441 local-scope 442 assume-screen 20/width, 2/height -443 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity -444 read-move-routine:num <- start-running read-move, source, screen:&:screen +443 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity +444 read-move-routine:num <- start-running read-move, source, screen:&:screen 445 run [ 446 ¦ # 'read-move' is waiting for input 447 ¦ wait-for-routine-to-block read-move-routine @@ -514,7 +514,7 @@ if ('onhashchange' in window) { 450 ¦ assert waiting?, [ 451 F read-move-quit: routine failed to pause after coming up (before any keys were pressed)] 452 ¦ # press 'q' -453 ¦ sink <- write sink, 113/q +453 ¦ sink <- write sink, 113/q 454 ¦ restart read-move-routine 455 ¦ # 'read-move' completes 456 ¦ wait-for-routine-to-block read-move-routine @@ -532,8 +532,8 @@ if ('onhashchange' in window) { 468 scenario read-move-illegal-file [ 469 local-scope 470 assume-screen 20/width, 2/height -471 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity -472 read-move-routine:num <- start-running read-move, source, screen:&:screen +471 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity +472 read-move-routine:num <- start-running read-move, source, screen:&:screen 473 run [ 474 ¦ # 'read-move' is waiting for input 475 ¦ wait-for-routine-to-block read-move-routine @@ -541,7 +541,7 @@ if ('onhashchange' in window) { 477 ¦ waiting?:bool <- not-equal read-move-state, 2/discontinued 478 ¦ assert waiting?, [ 479 F read-move-illegal-file: routine failed to pause after coming up (before any keys were pressed)] -480 ¦ sink <- write sink, 50/'2' +480 ¦ sink <- write sink, 50/'2' 481 ¦ restart read-move-routine 482 ¦ wait-for-routine-to-block read-move-routine 483 ] @@ -554,8 +554,8 @@ if ('onhashchange' in window) { 490 scenario read-move-illegal-rank [ 491 local-scope 492 assume-screen 20/width, 2/height -493 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity -494 read-move-routine:num <- start-running read-move, source, screen:&:screen +493 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity +494 read-move-routine:num <- start-running read-move, source, screen:&:screen 495 run [ 496 ¦ # 'read-move' is waiting for input 497 ¦ wait-for-routine-to-block read-move-routine @@ -563,8 +563,8 @@ if ('onhashchange' in window) { 499 ¦ waiting?:bool <- not-equal read-move-state, 2/discontinued 500 ¦ assert waiting?, [ 501 F read-move-illegal-rank: routine failed to pause after coming up (before any keys were pressed)] -502 ¦ sink <- write sink, 97/a -503 ¦ sink <- write sink, 97/a +502 ¦ sink <- write sink, 97/a +503 ¦ sink <- write sink, 97/a 504 ¦ restart read-move-routine 505 ¦ wait-for-routine-to-block read-move-routine 506 ] @@ -577,8 +577,8 @@ if ('onhashchange' in window) { 513 scenario read-move-empty [ 514 local-scope 515 assume-screen 20/width, 2/height -516 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity -517 read-move-routine:num <- start-running read-move, source, screen:&:screen +516 source:&:source:char, sink:&:sink:char <- new-channel 2/capacity +517 read-move-routine:num <- start-running read-move, source, screen:&:screen 518 run [ 519 ¦ # 'read-move' is waiting for input 520 ¦ wait-for-routine-to-block read-move-routine @@ -586,8 +586,8 @@ if ('onhashchange' in window) { 522 ¦ waiting?:bool <- not-equal read-move-state, 2/discontinued 523 ¦ assert waiting?, [ 524 F read-move-empty: routine failed to pause after coming up (before any keys were pressed)] -525 ¦ sink <- write sink, 10/newline -526 ¦ sink <- write sink, 97/a +525 ¦ sink <- write sink, 10/newline +526 ¦ sink <- write sink, 97/a 527 ¦ restart read-move-routine 528 ¦ wait-for-routine-to-block read-move-routine 529 ] -- cgit 1.4.1-2-gfad0