Definition
This idiom is used to indicate a plan to retaliate against someone by using the same harmful tactics or actions they have used against you.
If you've decided not to share your resources with me, don't be surprised if I decide that 'two can play at that game.'
He started spreading rumors about me, and I thought, 'Two can play at that game.'
If they plan to exclude me at work, then I can also say, 'two can play at that game.'