new cow breeder app

This commit is contained in:
kepler155c
2018-10-17 20:16:01 -04:00
parent 72bf4d89ba
commit 51e73e1c98

View File

@@ -25,8 +25,8 @@ local function getCowCount()
Util.filterInplace(blocks, function(v)
if v.name == 'Cow' then
grown = grown + (v.y > -.5) and 1 or 0
babies = babies + (v.y < -.5) and 1 or 0
if v.y > -.5 then grown = grown + 1 end
if v.y < -.5 then babies = babies + 1 end
return v.y > -.5
end
end)