online-bridge-hackathon / DDS

An api that returns DDS results for a given deal or partial deal
https://bit.ly/bridge-hackathon
Apache License 2.0
4 stars 7 forks source link

Accept a partial deal, with the same number of cards in each hand #30

Open tameware opened 4 years ago

tameware commented 4 years ago

This produces a result, but not a correct one!

$ curl --header "Content-Type: application/json" --request POST --data '{"hands": {"N": ["SA"], "E": ["HA"], "S": ["DA"], "W": ["CA"]}}' http://localhost:5000/api/dds-table/

{ "S": { "N": 13, "E": 13, "S": 13, "W": 12 }, "H": { "N": 13, "E": 13, "S": 13, "W": 13 }, "D": { "N": 13, "E": 13, "S": 13, "W": 12 }, "C": { "N": 13, "E": 13, "S": 13, "W": 13 }, "N": { "N": 13, "E": 13, "S": 13, "W": 12 } }

tameware commented 4 years ago

Should be straightforward to implement. ddslib supports this, we just need to update our Python wrapper. Once this is done we can relax the "13 cards per hand" requirement in the frontend.

After this, or along with it, we should allow DD analysis in the middle of a trick. We'll need that in order to allow the user to play through a deal one card at a time.