I have a list of objects I must set a property based on two criteria the 2D grid looks like this:
Property 2\Property 1 B<80 80<B<100 100<B<120 B>120
A < 100 None Red Orange Orange
100 < A < 120 None Red Orange Green
120 < A < 140 None Red Green Green
140 < A None Orange Green Green
Is there a good way to loop Property 1 and Property 2 to dynamically set the object property? It is a possibility that in the future we add few criteria and I guess that doing multiple ifs isn't a good solution. I'm trying to avoid redundant code.
Thanks