Definition
This idiom is used to express that one will retaliate in kind when someone else has done something harmful or unpleasant.
If they decide not to invite us to their wedding, fine, two can play at that game.
He started spreading rumors about me at the office, so I thought, 'two can play at that game'.
Since you decided to criticize my work in the meeting, two can play at that game, and I'll bring up issues with your project.