--!strict

local function run(LightChanger, reverse)
	local lights = LightChanger:GetLights("Numbered")
	for groupNumber, lightGroup in lights do
		local angle = if groupNumber % 2 == 0 then 60 else 30
		if reverse then
			if angle == 60 then
				angle = 30
			else
				angle = 60
			end
		end
		LightChanger:Tilt(angle, lightGroup)
	end
end

return function(LightChangerA, LightChangerB, reverse: boolean)
	run(LightChangerA, reverse)
	run(LightChangerB, reverse)
end
