Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sleep(1)
- local monitor = peripheral.wrap("top")
- for i = .5, 5, .5 do
- monitor.setTextScale(i)
- monitor.clear()
- end
- monitor.setTextScale(.5)
- maxx, maxy = monitor.getSize()
- punkt = {}
- for spalte = 1, maxx do
- punkt[spalte] = {}
- for zeile = 1, maxy do
- punkt[spalte][zeile] = 0 --0=schwarz,1=weiss
- monitor.setCursorPos(spalte, zeile)
- monitor.setBackgroundColour( colours.black )
- -- monitor.write(" ")
- end
- end
- monitor.clear()
- anzahl = 50 --Anzahl der sichtbaren Pixel
- xkoordinate = {}
- ykoordinate = {}
- for x = 1, anzahl do
- xkoordinate[x] = 1
- ykoordinate[x] = 1
- end
- while true do
- spalte = math.floor(math.random(1,maxx))
- zeile = math.floor(math.random(1,maxy))
- monitor.setCursorPos(spalte, zeile)
- monitor.setBackgroundColour( colours.white )
- monitor.write(" ")
- xkoordinate[1] = spalte
- ykoordinate[1] = zeile
- for x = anzahl, 2, -1 do
- xkoordinate[x] = xkoordinate[x - 1]
- ykoordinate[x] = ykoordinate[x - 1]
- end
- monitor.setCursorPos(xkoordinate[anzahl], ykoordinate[anzahl])
- monitor.setBackgroundColour( colours.black )
- monitor.write(" ")
- --[[
- if punkt[spalte][zeile] == 0 then
- monitor.setBackgroundColour( colours.white )
- punkt[spalte][zeile] = 1
- else
- monitor.setBackgroundColour( colours.black )
- punkt[spalte][zeile] = 0
- end
- --]]
- sleep(.1)
- end
- --[[
- ]]sleep(1)
- local monitor = peripheral.wrap("top")
- for i = .5, 5, .5 do
- monitor.setTextScale(i)
- monitor.clear()
- end
- monitor.setTextScale(.5)
- maxx, maxy = monitor.getSize()
- punkt = {}
- for spalte = 1, maxx do
- punkt[spalte] = {}
- for zeile = 1, maxy do
- punkt[spalte][zeile] = 0 --0=schwarz,1=weiss
- monitor.setCursorPos(spalte, zeile)
- monitor.setBackgroundColour( colours.black )
- -- monitor.write(" ")
- end
- end
- monitor.clear()
- anzahl = 50 --Anzahl der sichtbaren Pixel
- xkoordinate = {}
- ykoordinate = {}
- for x = 1, anzahl do
- xkoordinate[x] = 1
- ykoordinate[x] = 1
- end
- while true do
- spalte = math.floor(math.random(1,maxx))
- zeile = math.floor(math.random(1,maxy))
- monitor.setCursorPos(spalte, zeile)
- monitor.setBackgroundColour( colours.white )
- monitor.write(" ")
- xkoordinate[1] = spalte
- ykoordinate[1] = zeile
- for x = anzahl, 2, -1 do
- xkoordinate[x] = xkoordinate[x - 1]
- ykoordinate[x] = ykoordinate[x - 1]
- end
- monitor.setCursorPos(xkoordinate[anzahl], ykoordinate[anzahl])
- monitor.setBackgroundColour( colours.black )
- monitor.write(" ")
- --[[
- if punkt[spalte][zeile] == 0 then
- monitor.setBackgroundColour( colours.white )
- punkt[spalte][zeile] = 1
- else
- monitor.setBackgroundColour( colours.black )
- punkt[spalte][zeile] = 0
- end
- --]]
- sleep(.1)
- end
- --[[
- ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement