From c33bda7e3623baab3298d276f1da2738ff634ceb Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 11 Jan 2022 19:11:39 -0600 Subject: [PATCH] Add `cowthink` function --- src/Cowsay.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Cowsay.jl b/src/Cowsay.jl index 464c9cc..1363eea 100644 --- a/src/Cowsay.jl +++ b/src/Cowsay.jl @@ -1,6 +1,7 @@ module Cowsay export cowsay +export cowthink include("cows/blowfish.cow.jl") include("cows/bunny.cow.jl") @@ -96,6 +97,11 @@ function cowsay(message::AbstractString; cow=default, eyes="oo", tongue=" ") println(string(balloon, cow(eyes=eyes, tongue=tongue))) end +function cowthink(message::AbstractString; cow=default, eyes="oo", tongue=" ") + balloon = thinkballoon(message) + println(string(balloon, cow(eyes=eyes, tongue=tongue, thoughts="o"))) +end + function sayballoon(message::AbstractString) messagelines = split(message, "\n") nlines = length(messagelines)