To play both ends against the middle
When we hedge against a risk, we may be said to "play both ends against the middle." Word sleuths trace the phrase to 19th-century American gamblers who cheated at faro, a card game. Selected cards were trimmed slightly, noticeable only to the cheat. who then could tell where the cards were in a deck. Cards cut convex or concave across the top and bottom were said to be cut "both ends against the middle," the ends being the ends of the trimmed cards.
Several writers say this term, meaning "to trifle with someone's affections" or "to take advantage of a situation," derives from a game called "fast and loose" that sharpsters played at county fairs in medieval England. The operator arranged a belt on a table so that a spectator thought he could insert a skewer through its folds and pin it (or make it "fast") to a table. But the trickster would cleverly coil the belt and pull it loose before the customer could succeed. Shakespeare immortalized the con in "Antony and Cleopatra": "Like a right gipsy, hath, at fast and loose," Mark Antony says, "Beguiled me to the very heart of loss."