I am trying to understand the first premise.
Let's say I have various shapes of various colors.
shape.shape_color(circle,red)
shape.shape_color(circle,green)
shape.shape_color(circle,blue)
and I have a preferential order = ['blue','green','red']
So i want circle , blue as the final shape color pair.
I have the following rule -
select_shape_colors
foreach
shape.shape_color($shape,$color)
$color_preference = get_color_preference()
forall $color in color_preference
first
shape.shape_color($shape2,$color2)
assert
shape.final_shape_color($shape2,$color2)
fc_extras
def get_color_preference():
return ('blue','green','red')
I an unable to figure out the errors in this rule, be it syntax or logical.
Does anyone have any idea?
Thanks