Find all pairs.
You separate temporary reveal state from permanent matched state to keep logic clean.
Open the code and try the variant ideas listed in comments near the bottom.