This commit is contained in:
Crispy 2025-07-03 01:23:46 +02:00
parent 491112768c
commit 68ec37f994
66 changed files with 6591 additions and 10096 deletions

View file

@ -18,7 +18,7 @@ while true do
filename,
"r"
)
lines = {}
counts = {}
vec = stringtovec(message)
print(vector.new().tostring(vec))
record = nil
@ -26,22 +26,22 @@ while true do
line = file.readLine()
wec = (line and stringtovec(line)) or nil
adding = wec
if
if
(wec)
and (
(not record)
or
(not record)
or
(wec.y <= record.y)
)
)
then
if
(not record)
or
if
(not record)
or
(
(vec-wec):length()
<
(vec-wec):length()
<
(vec-record):length()
)
)
then
--pp.pretty_print(wec)
--write("is better than")
@ -51,18 +51,18 @@ while true do
end
end
if adding then
table.insert(lines,adding:tostring())
table.insert(counts,adding:tostring())
end
until not line
rednet.send(id,record:tostring(),"nexttobuild")
print(record)
file.close()
file = fs.open(filename,"w")
for i,v in pairs(lines) do
for i,v in pairs(counts) do
file.writeLine(v)
end
file.close()
else
file = fs.open(filename,"r")
line = file.readLine()