summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-30 19:48:56 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 06:41:38 (GMT)
commitf59c69bf0d90bdef5938386ab9dbb860705c3332 (patch)
tree7e99b115bd014ae82330fb86f6ee23b6826bdf1e
parente8db54fb2405b3ed343c3b7c039f4483c17431a5 (diff)
Hand: improve Debug.mahJongg output
-rw-r--r--src/hand.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hand.py b/src/hand.py
index 9ad7480..b9f477b 100644
--- a/src/hand.py
+++ b/src/hand.py
@@ -93,7 +93,6 @@ class Hand(object):
self._player = weakref.ref(player)
self.ruleset = player.game.ruleset
self.intelligence = player.intelligence if player else AIDefault()
-
self.string = string
self.__robbedTile = Tile.unknown
self.prevHand = prevHand
@@ -117,7 +116,7 @@ class Hand(object):
self.__parseString(string)
self.__won = self.lenOffset == 1 and player.mayWin
- if Debug.hand or Debug.mahJongg:
+ if Debug.hand or (Debug.mahJongg and self.lenOffset == 1):
self.debug(fmt('{callers}',
callers=callers(exclude=['__init__'])))
Hand.indent += 1
@@ -135,7 +134,7 @@ class Hand(object):
self.__score = Score()
finally:
self._fixed = True
- if Debug.hand:
+ if Debug.hand or (Debug.mahJongg and self.lenOffset == 1):
_hideSelf = str(self)
_hideScore = str(self.score)
self.debug(fmt(