diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-01-17 23:15:03 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-01-17 23:15:03 -0800 |
commit | 83d8299d2d966c39b4970828ff5743a5b05e3287 (patch) | |
tree | d2b0203d068b1c5651c58928c0f2fdf98d558789 /chessboard.mu | |
parent | 94fed2020040cf469bd47c8890ed4e609e3ed561 (diff) | |
download | mu-83d8299d2d966c39b4970828ff5743a5b05e3287.tar.gz |
2562
We want to use the type 'recipe' for recipe *variables*, because it seems nicer to say `recipe number -> number` rather than recipe-ordinal, etc. To support this we'll allow recipe names to be mentioned without any type. This might make a couple of places in this commit more brittle. I'm dropping error messages, causing them to not happen in some situations. Maybe I should just bite the bullet and require an explicit :recipe-literal. We'll see.
Diffstat (limited to 'chessboard.mu')
-rw-r--r-- | chessboard.mu | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chessboard.mu b/chessboard.mu index e5f894fa..3347e253 100644 --- a/chessboard.mu +++ b/chessboard.mu @@ -72,10 +72,10 @@ recipe chessboard screen:address:screen, console:address:console -> screen:addre board:address:array:address:array:character <- initial-position # hook up stdin stdin:address:channel <- new-channel 10/capacity - start-running send-keys-to-channel:recipe, console, stdin, screen + start-running send-keys-to-channel, console, stdin, screen # buffer lines in stdin buffered-stdin:address:channel <- new-channel 10/capacity - start-running buffer-lines:recipe, stdin, buffered-stdin + start-running buffer-lines, stdin, buffered-stdin { msg:address:array:character <- new [Stupid text-mode chessboard. White pieces in uppercase; black pieces in lowercase. No checking for legal moves. ] @@ -381,7 +381,7 @@ scenario read-move-blocking [ assume-screen 20/width, 2/height run [ 1:address:channel <- new-channel 2 - 2:number/routine <- start-running read-move:recipe, 1:address:channel, screen:address:screen + 2:number/routine <- start-running read-move, 1:address:channel, screen:address:screen # 'read-move' is waiting for input wait-for-routine 2:number 3:number <- routine-state 2:number/id @@ -453,7 +453,7 @@ scenario read-move-quit [ assume-screen 20/width, 2/height run [ 1:address:channel <- new-channel 2 - 2:number/routine <- start-running read-move:recipe, 1:address:channel, screen:address:screen + 2:number/routine <- start-running read-move, 1:address:channel, screen:address:screen # 'read-move' is waiting for input wait-for-routine 2:number 3:number <- routine-state 2:number/id @@ -480,7 +480,7 @@ scenario read-move-illegal-file [ assume-screen 20/width, 2/height run [ 1:address:channel <- new-channel 2 - 2:number/routine <- start-running read-move:recipe, 1:address:channel, screen:address:screen + 2:number/routine <- start-running read-move, 1:address:channel, screen:address:screen # 'read-move' is waiting for input wait-for-routine 2:number 3:number <- routine-state 2:number/id @@ -501,7 +501,7 @@ scenario read-move-illegal-rank [ assume-screen 20/width, 2/height run [ 1:address:channel <- new-channel 2 - 2:number/routine <- start-running read-move:recipe, 1:address:channel, screen:address:screen + 2:number/routine <- start-running read-move, 1:address:channel, screen:address:screen # 'read-move' is waiting for input wait-for-routine 2:number 3:number <- routine-state 2:number/id @@ -523,7 +523,7 @@ scenario read-move-empty [ assume-screen 20/width, 2/height run [ 1:address:channel <- new-channel 2 - 2:number/routine <- start-running read-move:recipe, 1:address:channel, screen:address:screen + 2:number/routine <- start-running read-move, 1:address:channel, screen:address:screen # 'read-move' is waiting for input wait-for-routine 2:number 3:number <- routine-state 2:number/id |