انتقل إلى المحتوى

وحدة:حساب نقاط م ت ك

من ويكيبيديا، الموسوعة الحرة
local p = {}

function p.calculateScore(frame)
  local references = tonumber(frame.args[1]) or 0
  local sizeKB = math.floor((tonumber(frame.args[2]) or 0) / 1000) 
  local infoBox = frame.args[3] == "نعم" and 1 or 0 
  local moroccan = frame.args[4] == "نعم" and 1 or 0 

  return references + sizeKB + infoBox + moroccan
end

return p