electronic dice by AndoDaan

p={"0 0 0","1 0 0", "0 1 0","0 0 1", "1 0 1"}
d={{1,3,1},{4,1,2},{2,3,4},{5,1,5},{5,3,5},{5,5,5}}
while""do
f=tonumber(io.read"*l")
for i=1,3 do
print(p[d[f][i]])
end
print()
end

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page