summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-29 18:46:22 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:47:05 (GMT)
commit001f09014854e2ada5d2835864b68087529331c7 (patch)
tree5155fb627fddf5e62508089c38e8be85bed5607f
parente43315624320c88a65b0adb6cbca8b921ecc36f4 (diff)
HandId: better alignment for debug output
-rw-r--r--src/game.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game.py b/src/game.py
index 627bb5b..8f18935 100644
--- a/src/game.py
+++ b/src/game.py
@@ -152,6 +152,8 @@ class HandId(object):
while num:
charId = chr(ord('a') + (num - 1) % 26) + charId
num = (num - 1) // 26
+ if not charId:
+ charId = ' ' # align to the most common case
wind = (WINDS + 'X')[self.roundsFinished]
if withSeed:
seed = self.seed
@@ -161,7 +163,7 @@ class HandId(object):
result = '%s%s%s%s%s%s' % (
aiVariant, seed, delim, wind, self.rotated + 1, charId)
if withMoveCount:
- result += '/%d' % self.moveCount
+ result += '/%3d' % self.moveCount
return result
def token(self):