summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-23 12:12:19 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-24 11:47:06 (GMT)
commitbfce921bcbb79393951c623479272869088357b3 (patch)
treede8a607d79a57c01e4c87f9154baec9bcaf600f9
parentebccfaed28914abb7c2a86b2838e0e3aeed1c28b (diff)
Player: tighten an assertion
-rw-r--r--src/player.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player.py b/src/player.py
index 7e56665..8742205 100644
--- a/src/player.py
+++ b/src/player.py
@@ -483,6 +483,8 @@ class PlayingPlayer(Player):
self.game.debug(' with hand being {}'.format(self.hand))
melds = concealed[:]
self.game.winner = self
+ assert lastMeld in melds, '%s: melds=%s lastMeld=%s lastTile=%s withDiscard=%s' % (
+ self._concealedTiles, melds, lastMeld, lastTile, withDiscard)
if withDiscard:
PlayingPlayer.addConcealedTiles(
self,
@@ -490,8 +492,6 @@ class PlayingPlayer(Player):
if self.lastSource != 'k': # robbed the kong
self.lastSource = 'd'
# the last claimed meld is exposed
- assert lastMeld in melds, '%s: melds=%s lastMeld=%s lastTile=%s withDiscard=%s' % (
- self._concealedTiles, melds, lastMeld, lastTile, withDiscard)
melds.remove(lastMeld)
lastTile = withDiscard.exposed
lastMeld = lastMeld.exposed