summaryrefslogtreecommitdiff
path: root/bcdd
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-07-18 02:27:25 +0200
committeremkael <emkael@tlen.pl>2019-07-18 02:27:25 +0200
commit7ea2a2abc6a432ffcb9a6ca54491e48fd2eb3a64 (patch)
tree4341376a1b61c83415fce36fe7ec7c68df41b9ce /bcdd
parentf8463b31e26bfeb7086090cb83f8ff31d9e007b9 (diff)
Option to hide BCalc banner
Diffstat (limited to 'bcdd')
-rw-r--r--bcdd/DDTable.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bcdd/DDTable.py b/bcdd/DDTable.py
index df5b8eb..651aec3 100644
--- a/bcdd/DDTable.py
+++ b/bcdd/DDTable.py
@@ -35,8 +35,8 @@ class DDTable(object):
raise DDTableInvalidException(
'BCalc error: %s' % (c_char_p(error).value.decode('ascii')))
- def get_bcalc_table(self):
- if not DDTable._banner_displayed:
+ def get_bcalc_table(self, show_banner=True):
+ if not DDTable._banner_displayed and show_banner:
print('Double dummy analysis provided by BCalc.')
print('BCalc is awesome, check it out: http://bcalc.w8.pl')
DDTable._banner_displayed = True
@@ -81,14 +81,14 @@ class DDTable(object):
result[player_id][denom_id] = tricks
return self._validate_table(result)
- def get_dd_table(self):
+ def get_dd_table(self, show_banner=True):
try:
return self.get_jfr_table()
except FieldNotFoundException:
try:
return self.get_pbn_table()
except FieldNotFoundException:
- return self.get_bcalc_table()
+ return self.get_bcalc_table(show_banner)
def print_table(self, dd_table):
print('\t' + '\t'.join(BCalcWrapper.DENOMINATIONS))