asm demo sans comments

This commit is contained in:
Mark Canlas
2022-12-04 13:59:02 -05:00
parent 178159f97e
commit 10e6eea846

View File

@@ -13,14 +13,23 @@ object PrintPrograms extends ZIOAppDefault:
private val programs = private val programs =
List[(String, String)]( List[(String, String)](
"one-line.txt" -> "one line", "one-line.txt" -> "one line",
"two-lines.txt" -> (Line.mkString _) "two-lines.txt" -> (Line.mkString _)
.apply(List("foo", "bar")), .apply(List("foo", "bar")),
"two-paragraphs.txt" -> (Line.mkString _) "two-paragraphs.txt" -> (Line.mkString _)
.compose(Paragraph.mkLines) .compose(Paragraph.mkLines)
.apply(List(Paragraph("foo", "bar"), Paragraph("alpha", "bravo"))) .apply(List(Paragraph("foo", "bar"), Paragraph("alpha", "bravo"))),
"annotated-snake.asm" -> (Line.mkString _)
.compose(Paragraph.mkLines)
.apply(List(Paragraph(asciiArt), Paragraph("Change direction: W A S D")))
) )
lazy val asciiArt =
""" ___ _ __ ___ __ ___
|/ __|_ _ __ _| |_____ / /| __|/ \_ )
|\__ \ ' \/ _` | / / -_) _ \__ \ () / /
||___/_||_\__,_|_\_\___\___/___/\__/___|""".stripMargin
def run: Task[Unit] = def run: Task[Unit] =
for { for {
// just a traverse in slow motion... // just a traverse in slow motion...