Not sure about totally freeform, but you can try out PySol
PySol is an exciting collection of more than 200 solitaire card games.
Its features include support for lots
of distinct games, very nice look and
feel, multiple cardsets and table
tiles, sound and background music,
unlimited undo & redo, load & save
games, player statistics and log
files, hint system, demo games,
support for user written plug-ins,
integrated HTML help browser and lots
Among the supported games are classics like Aces Up, Baker's Game,
Canfield, FreeCell, Forty Thieves,
Golf, Klondike, Pyramid, Scorpion,
Spider, Yukon, and many more...