bugfix: allow 3-suit variants

This commit is contained in:
Maximilian Keßler 2024-03-18 14:02:27 +01:00
parent 7a6e62b8d9
commit 9ef1add7ab
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -37,7 +37,7 @@ class HanabLiveInstance(hanab_game.HanabiInstance):
err_msg + "Illegal number of suits ({}) found, must be in range [3,6]".format(instance.num_suits)
assert 0 <= instance.num_dark_suits <= 2, \
err_msg + "Illegal number of dark suits ({}) found, must be in range [0,2]".format(instance.num_dark_suits)
assert 4 <= instance.num_suits - instance.num_dark_suits, \
assert 4 <= max(instance.num_suits, 4) - instance.num_dark_suits, \
err_msg + "Illegal ratio of dark suits to suits, can have at most {} dark suits with {} total suits".format(
max(instance.num_suits - 4, 0), instance.num_suits
)