Abstract cow to cowfile

Signed-off-by: Thomas A. Christensen II <25492070+MillironX@users.noreply.github.com>
This commit is contained in:
Thomas A. Christensen II 2021-11-23 11:20:17 -06:00
parent 1cd41f6729
commit 749efc52df
Signed by: millironx
GPG key ID: 139C07724802BC5D
2 changed files with 14 additions and 9 deletions

View file

@ -2,6 +2,8 @@ module Cowsay
export cowsay
include("cows/default.cow.jl")
"""
cowsay(message::AbstractString)
@ -52,15 +54,7 @@ function cowsay(message::AbstractString)
)
end
cow = string(
" \\ ^__^\n",
" \\ (oo)\\_______\n",
" (__)\\ )\\/\\\n",
" ||----w |\n",
" || ||"
)
println(string(balloon, cow))
println(string(balloon, default()))
end

11
src/cows/default.cow.jl Normal file
View file

@ -0,0 +1,11 @@
function default(;eyes="oo", tongue=" ", thoughts="\\")
thecow =
"""
$thoughts ^__^
$thoughts ($eyes)\\_______
(__)\\ )\\/\\
$tongue ||----w |
|| ||
"""
return thecow
end