diff options
author | Michał Klichowicz <emkael@tlen.pl> | 2023-10-02 22:52:50 +0200 |
---|---|---|
committer | Michał Klichowicz <emkael@tlen.pl> | 2023-10-02 22:55:17 +0200 |
commit | c16eb493bb130ad94ece708248235888c9224301 (patch) | |
tree | 258fe033eaa4becd0336576ae38ba95aa2850b76 /src/main.py | |
parent | d930b2d1089ead6e27ff79364a474410abb0b444 (diff) |
Lead card import
Diffstat (limited to 'src/main.py')
-rw-r--r-- | src/main.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.py b/src/main.py index 20b81f6..e90360b 100644 --- a/src/main.py +++ b/src/main.py @@ -148,11 +148,16 @@ def get_pbn_score(b): contract = contract[0] + ' ' + contract[1:] result = int(b.get_field('Result')) - get_digits(contract) - 6 score = int(b.get_field('Score').replace('NS ', '')) # co z pasami? + play_data = b.get_play_data() + if play_data: + play_data = ' '.join(play_data).split(' ') + if play_data: + lead = play_data[0].strip() + lead = lead[0] + ' ' + lead[1] else: # passed-out hand contract = contract.upper() result = 0 score = 0 - lead = '' # wtf? return declarer, contract, result, score, lead |