Closed markgonzalez2 closed 1 year ago
It seems that -2 denotes that all playable cards are equal (e.g., a singleton). Can this behavior be toggled?
Ah, I hadn’t noticed that…thanks for letting me know - yes I think you’re right, it’s probably one of the flags passed to the dds library. I’ll have a look this afternoon when i get back from work.
Yep was using the wrong mode
flag..fix pushed to master branch, CI is running now and assuming it passes I'll tag and push to PyPI in the morning.
fixed in 0.4.10, you should be able to update via pypi now :).
d = Deal("N:987... K45... AQ2... T63...", first = Player.west, trump = Denom.spades)
d.play("S6")
for solution in solve_all_boards([d]):
try:
for card, tricks in solution:
print(card, tricks)
except TypeError:
break
This slightly modified code still outputs the negative values.
Mea culpa, I don't get to play around with this as much nowadays so I forget how it works.
CI running now with same fix as before, and also fixed the iteration of SolvedBoardList
so you don't have to catch the TypeError
(I was returning not raising an IndexError
....)
ok hopefully the version now on pypi fixes this issue for good now XD
This code outputs:
Change the 9 to a J and you get the correct output: