dominicprice / endplay

A suite of tools for generation and analysis of bridge deals. Read the documentation at https://endplay.readthedocs.io
MIT License
21 stars 5 forks source link

Generate a random incomplete `Deal` (e.g. a random 4-card ending) #22

Open johny-b opened 11 months ago

johny-b commented 11 months ago

I want a random Deal, but not 13-card but with some lower number of cards.

Is there a clean way to do this? If not, do you think this feature makes sense (and are you interested in a PR)?

(I don't need help with "ugly" solutions :) )

dominicprice commented 11 months ago

Hiya,

Apologies for the late reply.

There's no inbuilt way of doing this at the moment, but I agree it is a potentially useful feature. The generate_deal function is a bit messy, but if you have an algorithm in mind then I would definitely be interested in a PR :)

Thanks, Dom