Skip to content

Commit

Permalink
Print morse code symbols in blue
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Dec 17, 2024
1 parent c747a6b commit c9340fb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/crooked_rook.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit c9340fb

Please sign in to comment.