private static int BuyFood(IHuman currentBuyer) { if (currentBuyer != null) { currentBuyer.BuyFood(); if (currentBuyer is Citizen) { return(10); } else { return(5); } } return(0); }