From c9340fb5b817eb15863acf7580c5bfefba8ad5e6 Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Tue, 17 Dec 2024 15:44:04 +0100 Subject: [PATCH] Print morse code symbols in blue --- src/crooked_rook.gleam | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/crooked_rook.gleam b/src/crooked_rook.gleam index 7300d31..272c5f3 100644 --- a/src/crooked_rook.gleam +++ b/src/crooked_rook.gleam @@ -43,7 +43,13 @@ fn ask_move(prompt) -> String { fn print_morse(move: String) -> Nil { case morsey.encode(move) { - Ok(symbols) -> io.println(" " <> morsey.to_string(symbols)) + Ok(symbols) -> + symbols + |> morsey.to_string + |> ansi.blue + |> string.append(" ") + |> io.println + Error(morsey.InvalidCharacter(_)) -> Nil } }