Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This is part of a Computercraft Programming Teaching Program
- tSides = {"left","right","bottom","top","front","back"}
- for i = 1, #tSides do
- monitor = peripheral.wrap(tSides[i])
- if monitor then
- side = tSides[i]
- break
- end
- end
- --Prevents program termination
- os.pullEvent = os.pullEventRaw
- term.redirect(peripheral.wrap(side))
- -- Resets Screen
- function reset()
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- end
- reset()
- print("Section 7.1 - Loops \n ")
- print("repeat - Opposite of a while loop. This will keep repeating until the condition is true")
- print("blah blah blah - fake code stuff")
- print("until a == 5 - This is used to close this loop instead of \"end\"")
- print("If the above condition is true, the loop will end. As this is on the bottom, this loop will run at least once")
- term.restore()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement