public object visit(meat m) // can't be red meat! { if ((m.kind == Meattype.white) && m.Calories < min.Calories) { min = m; } return(m.nextitem.accept(this)); }
public object visit(meat m) { Console.WriteLine("I'm eating " + m + " now"); cals += m.Calories; if (cals < max) { return(m.nextitem.accept(this)); } else { return(cals); } }
public object visit(meat m) { foodSum += m.Calories; return(m.nextitem.accept(this)); }
public object visit(meat m) { state = "meat"; return(m.nextitem.accept(this)); }