Control the cat with the mouse to catch the dog when you are "it" and to run away from the dog when you aren't.
Example of a state machine. Can you add a third "player"?