From 51e73e1c985438bad52aececb283267aa522072f Mon Sep 17 00:00:00 2001 From: kepler155c Date: Wed, 17 Oct 2018 20:16:01 -0400 Subject: [PATCH] new cow breeder app --- apps/cows.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/cows.lua b/apps/cows.lua index 03fb319..d3798cf 100644 --- a/apps/cows.lua +++ b/apps/cows.lua @@ -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)