Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Config fields
- local mon = peripheral.wrap("top")
- local sx, sy = mon.getSize()
- local compteur = 0
- local question = {}
- -- q = question
- -- r1 à r4 = réponse 1 à 4
- -- c = bonne réponse
- -- id = compteur ID
- local function addQuestion(q, r1, r2, r3, r4, c, id)
- question[id] = {}
- question[id]["question"] = q
- question[id]["rep1"] = r1
- question[id]["rep2"] = r2
- question[id]["rep3"] = r3
- question[id]["rep4"] = r4
- question[id]["select"] = c
- end
- local function readQuestion(id)
- mon.setBackgroundColor(colors.red)
- mon.setTextColor(colors.white)
- for i = 1, 7 do
- mon.setCursorPos(1, i)
- mon.clearLine()
- end
- end
- -- Launch
- rednet.open("back")
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.white)
- mon.clear()
- mon.setCursorPos(1, 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement