
Set many "values" to variables
Hi,
here is what I want to do. I want to have a couple of "squares". I want to
be able to set "properties" to these squares and then I want to do diffrent
things depending on the properties of these squeare.
For example,
I have 4 squares:
sq1, sq2, sq3 and sq4.
Now I want to set for example sq1 to "black" and "volvo" sq2 to "red" and
"Fiat"
then I want to be able to check if sq1 is black and if so do my stuff.
Can you do something like:
sq1.color = black and
sq1.car = volvo
then check like:
if sq1.color = black then
[Do the stuff]
TIA
/Stefan