Advertisement
BigBlow_

Untitled

Apr 2nd, 2023
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. -- Définition de la taille de l'écran
  2. local largeurEcran = 4
  3. local hauteurEcran = 2
  4.  
  5. -- Définition de la durée d'affichage de chaque image (en secondes)
  6. local tempsAffichage = 0.5
  7.  
  8. -- Définition des images à afficher
  9. local images = {
  10. " __ __ ",
  11. " / //_/ _ _____ ____ ",
  12. " / ,< / | / / _ \/ __ \\",
  13. " / /| |/ |/ / __/ /_/ /",
  14. "/_/ |_/_/|_/\\___/\\____/ ",
  15. "",
  16. " /\\_/\\ ",
  17. " / o o \\ ",
  18. " / > \\ ",
  19. " /_/\\_\\_/\\_\\ ",
  20. " ___| |___ ",
  21. " / \\ / \\ ",
  22. " / \\_____/ \\ ",
  23. "/_____________________\\",
  24. }
  25.  
  26. -- Fonction pour afficher une image sur l'écran
  27. local function afficherImage(image)
  28. -- Effacer l'écran
  29. term.clear()
  30. term.setCursorPos(1, 1)
  31.  
  32. -- Afficher l'image ligne par ligne
  33. for i = 1, #image do
  34. term.write(image[i])
  35. term.setCursorPos(1, i + 1)
  36. end
  37. end
  38.  
  39. -- Boucle principale du programme
  40. while true do
  41. -- Afficher chaque image une par une
  42. for i = 1, #images do
  43. afficherImage(images[i])
  44. sleep(tempsAffichage)
  45. end
  46. end
  47.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement