A programing game inspired by Corewar / Darwin
local Arena = require "moonwars"

local arena = Arena(10, 5)

local jummit
jummit = function(core)
	while true do
		for _, dir in ipairs{"up", "down", "left", "right"} do
			if not core.inspect(dir) then
				core.split(dir, jummit, core.charge() - 1)
			end
		end
	end
end

arena:spawn(4, 4, "Jummit", jummit)
arena:spawn(7, 4, "Ulf", jummit)

while true do
	arena:simulate()
	arena:draw()
	os.execute("sleep 0.05")
end