Created
September 9, 2025 11:09
-
-
Save 42LM/e10cc5dca3a630efcc82ffefb4ccff97 to your computer and use it in GitHub Desktop.
Simple ASCII movie
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| // Define the frames of the ASCII art movie | |
| frames := []string{ | |
| ` | |
| Frame 1: | |
| ___________ | |
| | | | |
| | Movie | | |
| | | | |
| |_________| | |
| `, | |
| ` | |
| Frame 2: | |
| ___________ | |
| | | | |
| | ASCII | | |
| | Movie | | |
| |_________| | |
| `, | |
| ` | |
| Frame 3: | |
| ___________ | |
| | | | |
| | Enjoy | | |
| | ASCII | | |
| | Movie | | |
| |_________| | |
| `, | |
| } | |
| // Loop through the frames and print them to the terminal | |
| for _, frame := range frames { | |
| // Clear the terminal before printing each frame | |
| fmt.Print("\033[H\033[2J") | |
| fmt.Println(frame) | |
| // Pause for a short duration between frames | |
| time.Sleep(500 * time.Millisecond) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment