Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Définition de la taille de l'écran
- local largeurEcran = 4
- local hauteurEcran = 2
- -- Définition de la durée d'affichage de chaque image (en secondes)
- local tempsAffichage = 0.5
- -- Définition des images à afficher
- local images = {
- " __ __ ",
- " / //_/ _ _____ ____ ",
- " / ,< / | / / _ \/ __ \\",
- " / /| |/ |/ / __/ /_/ /",
- "/_/ |_/_/|_/\\___/\\____/ ",
- "",
- " /\\_/\\ ",
- " / o o \\ ",
- " / > \\ ",
- " /_/\\_\\_/\\_\\ ",
- " ___| |___ ",
- " / \\ / \\ ",
- " / \\_____/ \\ ",
- "/_____________________\\",
- }
- -- Fonction pour afficher une image sur l'écran
- local function afficherImage(image)
- -- Effacer l'écran
- term.clear()
- term.setCursorPos(1, 1)
- -- Afficher l'image ligne par ligne
- for i = 1, #image do
- term.write(image[i])
- term.setCursorPos(1, i + 1)
- end
- end
- -- Boucle principale du programme
- while true do
- -- Afficher chaque image une par une
- for i = 1, #images do
- afficherImage(images[i])
- sleep(tempsAffichage)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement