View difference between Paste ID: 3mYFMa1x and 1iHP0Ark
SHOW: | | - or go back to the newest paste.
1
local direction = ">"
2
mon = peripheral.wrap("top")
3
term.redirect(mon)
4-
mon.setTextScale(0.5)
4+
mon.setTextScale(1)
5
6
7
function clear()
8
  term.clear()
9
  term.setCursorPos(1,1)
10
end
11
12
function change(param1)
13
	direction = param1
14
end
15
16
function redraw()
17
	clear()
18
	write("\n+---+---+---+---+  +-Info-+\n")
19
	write("|               |  |Dir." ..direction.. " |\n")
20
	write("|               |  |      |\n")
21
	write("|               |  +-Info-+\n")
22
	write("|               |\n")
23
	write("+---+---+---+---+\n")
24
	write("| < | v | ^ | > |\n")
25
	write("+---+---+---+---+\n")
26
	if direction == ">" then
27
		term.setCursorPos(13, 7)
28
	elseif direction == "<" then
29
		term.setCursorPos(3, 7)
30
	elseif direction == "v" then
31
		term.setCursorPos(7, 7)
32
	elseif direction == "^" then
33
		term.setCursorPos(9, 7)
34
	end
35
	
36
	write("^")
37
end
38
39
while true do
40
	redraw()
41
	if rs.getInput("right") == true then
42
		clear()
43
		change(">")
44
	elseif rs.getInput("left") == true then
45
		clear()
46
		change("<")
47
	elseif rs.getInput("back") == true then
48
		clear()
49
		change("v")
50
	elseif rs.getInput("bottom") == true then
51
		clear()
52
		change("^")
53
	end
54
	
55
	sleep(0)
56
end
57
58
term.restore()