mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 09:42:34 +02:00
Init
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
package teapot
|
||||
|
||||
import "strings"
|
||||
|
||||
// FrameLines returns the number of visual lines in a teapot frame.
|
||||
func FrameLines() int {
|
||||
frames := TeapotFrames()
|
||||
if len(frames) == 0 {
|
||||
return 0
|
||||
}
|
||||
return strings.Count(frames[0], "\n") + 1
|
||||
}
|
||||
|
||||
func Teapot() string {
|
||||
return "" +
|
||||
" ) \n" +
|
||||
" ( \n" +
|
||||
" ) \n" +
|
||||
" .-.,--^--. _ \n" +
|
||||
" \\\\| `---' |//\n" +
|
||||
" \\| / \n" +
|
||||
" _\\_______/_ "
|
||||
}
|
||||
|
||||
func TeapotFrames() []string {
|
||||
return []string{
|
||||
"" +
|
||||
" ) \n" +
|
||||
" ( \n" +
|
||||
" ) \n" +
|
||||
" .-.,--^--. _ \n" +
|
||||
" \\\\| `---' |//\n" +
|
||||
" \\| / \n" +
|
||||
" _\\_______/_ ",
|
||||
|
||||
"" +
|
||||
" ) \n" +
|
||||
" ( \n" +
|
||||
" ) \n" +
|
||||
" .-.,--^--. _ \n" +
|
||||
" \\\\| `---' |//\n" +
|
||||
" \\| / \n" +
|
||||
" _\\_______/_ ",
|
||||
|
||||
"" +
|
||||
" ) \n" +
|
||||
" ( \n" +
|
||||
" ) \n" +
|
||||
" .-.,--^--. _ \n" +
|
||||
" \\\\| `---' |//\n" +
|
||||
" \\| / \n" +
|
||||
" _\\_______/_ ",
|
||||
|
||||
"" +
|
||||
" \n" +
|
||||
" ( \n" +
|
||||
" ) \n" +
|
||||
" .-.,--^--. _ \n" +
|
||||
" \\\\| `---' |//\n" +
|
||||
" \\| / \n" +
|
||||
" _\\_______/_ ",
|
||||
|
||||
"" +
|
||||
" \n" +
|
||||
" (( \n" +
|
||||
" ) \n" +
|
||||
" .-.,--^--. _ \n" +
|
||||
" \\\\| `---' |//\n" +
|
||||
" \\| / \n" +
|
||||
" _\\_______/_ ",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user