getInventory().contains(item1, item2)
Returns true if either item1 or item2 is in the inventory.
getInventory().interact("Eat", item1, item2)
Uses the interaction "Eat" on either item1 or item2 depending on which item it finds in the inventory first.
If you want to eat a Swordfish followed by a Pizza, you need to be explicit in your logic, i.e
If not eaten swordfish
Then eat swordfish
Else
Eat pizza
To track whether you have eaten a swordfish, just store a boolean value in a variable, e.g. hasEatenSwordfish, and set it to true when the "Eat" interaction on the swordfish is successful. Set it back to false when you eat the pizza