From c481e2057cac039b4e91ac1157e0157a67a501ca Mon Sep 17 00:00:00 2001 From: itsme Date: Sun, 9 Mar 2025 18:28:11 +0100 Subject: [PATCH] bugfix: in kleber1999 play would continue even though one player had already played all its cards. --- beggarmypython/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/beggarmypython/__init__.py b/beggarmypython/__init__.py index e2f4fb3..0e15cb5 100644 --- a/beggarmypython/__init__.py +++ b/beggarmypython/__init__.py @@ -68,6 +68,8 @@ def calculate(hands, firstCardOnLeft=True, verbose=False): stack = stack+next_card # add to the stack + if not b or not a: break + if next_card not in ['A', 'K', 'Q', 'J']: # not a court card if battle_in_progress: