I am currently building a CLips program for cell phones. I have different cell phones and thier specs. I am trying to figure out how to make defrules to sort out features such as Color. I will show what I mean below:
([phones_Class85] of Moto+X
(Battery+Life "240")
(Build+Material "Metal")
(Camera "13")
(Card+Slot "Yes")
(Color "Cream")
(FingerPrint+Scanner "No")
(Memory "16")
(Operating+System "Android")
(Price "119")
(RAM "1")
(Screen+Size "5.2")
(Water+Resistant "Yes")
(Weight "144"))
([phones_Class86] of IPhone+6
(Battery+Life "250")
(Build+Material "Metal")
(Camera "8")
(Card+Slot "No")
(Color "Gold")
(FingerPrint+Scanner "Yes")
(Memory "16")
(Operating+System "IOS")
(Price "199")
(RAM "1")
(Screen+Size "4.7")
(Water+Resistant "No")
(Weight "129"))
([phones_Class93] of IPhone+5s
(Battery+Life "250")
(Build+Material "Metal")
(Camera "8")
(Card+Slot "No")
(Color "Gold")
(FingerPrint+Scanner "Yes")
(Memory "16")
(Operating+System "IOS")
(Price "99")
(RAM "1")
(Screen+Size "4")
(Water+Resistant "No")
(Weight "112"))
As you can see I have different cell phones that have instances of different specs. There are many more but I jsut gave a few. I am trying to do something with a defrule that will allow me to print out all the phones whos Color is Gold. I am unsure of how to move through this when I have instances. Is there a way to access the different slots (Color) within the instances then go through each one checking it?