延迟线存储器-51 x 2880 = 146880
缩小:
输出出现在每个循环的顶部。
我用这个lua将所有状态直接放在导线上,让golly
电子在位之间前进,因此我们不必用光标跟随导线。
我使用这种幼稚的方法来设置标准和崩溃课程,wireworld,golly和lua。
local g = golly()
local minutes_in_day = 1440 -- 60x24
local interval = 4 -- how often to send electrons
local function bcd4(num)
num=math.floor(num)
local t={}
for b=4,1,-1 do
t[b]=math.floor(math.fmod(num,2))
num=(num-t[b])/2
end
return table.concat(t)
end
local function makewire(x,y1,y2)
for y1=1,y2 do g.setcell(x,y1,3) end
end
local function makeloop(x,y,size)
local len = size/2 - 1
makewire(x,y+1,len); makewire(x+2,y+1,len) -- main wires
g.setcell(x+1,y,3); g.setcell(x+1,y+len,3) -- endcape
end
local function paint(x,y,pattern)
for v in string.gmatch(pattern,".") do
if v=="1" then g.setcell(x, y, 1); g.setcell(x, y-1, 2) end
x = x + 4
end
g.show(pattern);g.update() -- slows things down but more interesting to watch
for i=1,interval do g.step() end
end
for x=0,63,4 do makeloop(x,0,minutes_in_day * interval) end
for hour = 0,23 do
for minute = 0,59 do
paint( 0, 2, bcd4(hour/10) .. bcd4(hour%10) .. bcd4(minute/10) .. bcd4(minute%10) )
end
end
为了进行测试,我添加了这些顶层导线并观看了它们的技巧。
这是将4组4线BCD收集到眼球的脚本。
-- watches 16 wires spaced 4 apart starting at (0,-4)
local ticks = 1440 -- set to match the length of your 24 hour loop
local g = golly()
local output = ""
local nums = { ["0000"] = "0", ["0001"] = "1", ["0010"] = "2", ["0011"] = "3", ["0100"] = "4",
["0101"] = "5", ["0110"] = "6", ["0111"] = "7", ["1000"] = "8", ["1001"] = "9",
["1010"] = "A", ["1011"] = "B", ["1100"] = "C", ["1101"] = "D", ["1110"] = "E",
["1111"] = "F" } -- full set in case we have errors (i did)
for i=0,ticks,1 do
local text = ""
for i=0,48,16 do -- set your X here, change the 0 and 48
local word = ""
for j=0,15,4 do
local bit = g.getcell(i+j,-4) -- set your Y here, change -4
if bit == 0 or bit == 3 then word = word .. "0" else word = word .. "1" end
end
text = text .. nums[word]
end
g.show(text); output = output..' '..text
g.update(); g.step();g.step();g.step();g.step()
end
g.note(output)
最终的答案需要修剪始终为零的线,并将其余的路由到其正确的BCD输入。