As an example let's take an easy action: Random card
This will check if there are cards in the play area, if this is the case a random one will be revealed.
Matching card is more complex. To be able to run, there must be a revealed card in the play area. Also there must the second matching card in memory since it want's to complete a set.
If both is true it will select the card matching the already revealed one, scoring a point.