A hand solitaire simulation algorithm