Check if the state of an agent matches a given state
matchState(agent, rule)
a logical value
an external pointer returned by newAgent
a list holding the state to match against
This function is equivalent to stateMatch(getState(agent), rule)
The state matches the rule if and only if each domain (names of the list) in rule has the same value as in state. The domains in domains of the state not listed in rule are not matched