Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local m = peripheral.find("monitor")
- local cBlack = colors.black
- local cWhite = colors.white
- local s = ""
- function setCharMode(_isWhiteOnBlack)
- if _isWhiteOnBlack then
- m.setTextColor(cWhite)
- m.setBackgroundColor(cBlack)
- else
- m.setTextColor(cBlack)
- m.setBackgroundColor(cWhite)
- end
- end
- function drawSpaceship(_x, _y)
- setCharMode(true)
- m.setCursorPos(_x, _y)
- m.write(string.char(158))
- setCharMode(false)
- m.setCursorPos(_x+1, _y)
- m.write(string.char(146))
- setCharMode(true)
- end
- function drawAlien(_x, _y)
- setCharMode(true)
- m.setCursorPos(_x, _y)
- m.write(string.char(155))
- setCharMode(false)
- m.setCursorPos(_x+1, _y)
- m.write(string.char(152))
- setCharMode(true)
- end
- m.clear()
- drawSpaceship(13, 11)
- for i=0, 5 do
- for j=0, 1 do
- drawAlien(2 + i*4, 2 + j*3)
- end
- end
Add Comment
Please, Sign In to add comment