Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[13 overlord
- 17 hatch, gas, pool
- @hatch queens, lings, metaboost
- @metaboost hatch, roach warren, 2xgas,4xroaches
- @hatch queen, evo chambers, lair, gas, 10xlings
- @evo chambers +1/+1, 2xgas, roach speed, 5x ravagers]]
- local memorize = {
- {"13","overlord"},
- {"17","hatch", "gas", "pool"},
- {"@hatch","2x queens", "2x lings", "metaboost"},
- {"@metaboost","hatch", "roach warren", "2x gas","4x roaches"},
- {"@hatch", "queen", "2x evo chambers", "lair", "gas", "10x lings"},
- {"@evo chambers", "+1/+1", "roach speed", "2xgas", "5x ravagers"},
- {"@roach speed","4th hatch","mass roach","attack"},
- }
- function showAns()
- --cprint("3 base roach/ravager",colors.yellow)
- for n,t in pairs(memorize) do
- cwrite(t[1],colors.orange)
- cprint(": "..table.concat(t,", ",2),colors.white)
- end
- end
- function cprint(str,txt,bak)
- local txt = txt or colors.white
- local bak = bak or colors.black
- term.setTextColor(txt)
- term.setBackgroundColor(bak)
- if str then
- print(str)
- end
- end
- function cwrite(str,txt,bak)
- local txt = txt or colors.white
- local bak = bak or colors.black
- term.setTextColor(txt)
- term.setBackgroundColor(bak)
- if str then
- write(str)
- end
- end
- function test()
- shell.run("clr")
- local success = true
- for i = 1,#memorize do
- cwrite(memorize[i][1]..": ",colors.orange)
- cwrite(_,colors.white)
- local ans = read()
- ans = string.gsub(ans,"%s","")
- cprint(ans,colors.yellow)
- if ans == string.gsub(table.concat(memorize[i],",",2),"%s","") then
- cprint("CORRECT",colors.green)
- else
- cprint("WRONG",colors.red)
- cprint(table.concat(memorize[i],",",2),colors.red)
- success = false
- break
- end
- end
- if success then
- cprint(_,colors.orange)
- textutils.slowPrint("CONGRATULATIONS")
- end
- end
- shell.run("clr")
- showAns()
- cprint("\n".."press any key to begin",colors.yellow)
- os.pullEvent("key")
- test()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement