Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Initialiser le moniteur
- local mon = peripheral.wrap("top")
- mon.setBackgroundColor(colors.black)
- mon.clear()
- mon.setTextScale(0.5) -- Réduit l'échelle pour plus de détails
- -- Fonction pour dessiner un cercle simplifié (un disque rempli)
- local function drawCircle(x, y, radius, color)
- mon.setBackgroundColor(color)
- for i = -radius, radius do
- for j = -radius, radius do
- if i * i + j * j <= radius * radius then
- mon.setCursorPos(x + i, y + j)
- mon.write(" ")
- end
- end
- end
- end
- -- Fonction pour dessiner les "branches" du symbole nucléaire
- local function drawNuclearSymbol()
- -- Paramètres pour centrer le symbole
- local centerX, centerY = 9, 5 -- Ajuster selon la taille de l’écran
- -- Couleurs
- local yellow = colors.yellow
- local black = colors.black
- -- Dessiner le cercle jaune pour le logo de fond
- drawCircle(centerX, centerY, 4, yellow)
- -- Dessiner les trois branches noires
- mon.setBackgroundColor(black)
- -- Branche 1 (haut)
- for i = 0, 3 do
- mon.setCursorPos(centerX, centerY - i)
- mon.write(" ")
- end
- -- Branche 2 (bas gauche)
- for i = 0, 3 do
- mon.setCursorPos(centerX - i, centerY + i)
- mon.write(" ")
- end
- -- Branche 3 (bas droite)
- for i = 0, 3 do
- mon.setCursorPos(centerX + i, centerY + i)
- mon.write(" ")
- end
- -- Petit cercle noir au centre
- drawCircle(centerX, centerY, 1, black)
- end
- -- Effacer l'ecran et dessiner le logo
- mon.clear()
- drawNuclearSymbol()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement