FunnyCore/main.lua
Christian Lincoln 28f25c5937 Final
2026-02-19 16:32:58 +00:00

28 lines
669 B
Lua

-- An example for testing
local runner = require("core")
local file = io.open(({...})[1])
if not file then error("Could not open: "..path) end
local content = file:read("*a")
for x = 32768,1,-1 do
print(x)
for y = 32768,1,-1 do
registers[1] = x
registers[2] = y
local reg,str = runner(content,false)
local dx = math.floor(x/y)
local rx = x%y
local dy = reg[3]
local ry = reg[4]
if not (dx==dy and rx==ry) then
end
print(x,y,dx,rx,dy,ry)
end
end
--[[for _,path in pairs({...}) do
local file = io.open(path)
if not file then error("Could not open: "..path) end
local content = file:read("*a")
runner(content)
end]]