package main
import (
"fmt"
"time"
"strings"
)
func clearScreen() {
fmt.Print("\033[H\033[2J")
}
func main() {
santa := "🎅"
renos := "🦌🦌🦌"
message := "go, go, go Santa!!"
width := 50
for i := 0; i < 50; i++ {
clearScreen()
spaces := strings.Repeat(" ", width-i)
fmt.Printf("%s%s%s\n", spaces, renos, santa)
fmt.Println(strings.Repeat(" ", width-i) + message)
time.Sleep(100 * time.Millisecond)
}
}
Ho ho ho! 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023...
Comentarios
Publicar un comentario