public virtual bool CheckFoodPreference( Item fed, FoodType type, Type[] types ) { if ( (FavoriteFood & type) == 0 ) return false; Type fedType = fed.GetType(); bool contains = false; for ( int i = 0; !contains && i < types.Length; ++i ) contains = ( fedType == types[i] ); return contains; }