Wiki says the latest episode was based on
The Sting which was my guess while I was watching this episode though as always it's quite loose,the big difference being that the movie involved betting on horses but if I remember correctly in both cases the con artist pretends to get killed and arrested in the end.
I have to ask though,did poker and blackjack exist in sengoku japan ?