Add cowthink function

This commit is contained in:
Thomas A. Christensen II 2022-01-11 19:11:39 -06:00
parent 09882d4768
commit c33bda7e36
Signed by: millironx
GPG key ID: 139C07724802BC5D

View file

@ -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)