summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-30 09:11:06 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 06:41:38 (GMT)
commit820cc36bfca23420ea7c3075610724cb686f4d9b (patch)
tree00719cf33d287db25c442da02957b86a2a9970bd
parent823802086b748fbc7b65029c8a3248d0435770c0 (diff)
Player.robTile renamed to Player.robTileFrom
-rw-r--r--src/message.py2
-rw-r--r--src/player.py4
-rw-r--r--src/server.py3
-rw-r--r--src/visible.py6
4 files changed, 8 insertions, 7 deletions
diff --git a/src/message.py b/src/message.py
index 93722a4..f114179 100644
--- a/src/message.py
+++ b/src/message.py
@@ -703,7 +703,7 @@ class MessageRobbedTheKong(NotifyAtOnceMessage, ServerMessage):
def clientAction(self, client, move):
"""mirror the action locally"""
prevMove = next(client.game.lastMoves(only=[Message.DeclaredKong]))
- prevMove.player.robTile(prevMove.meld[0].concealed)
+ prevMove.player.robTileFrom(prevMove.meld[0].concealed)
move.player.lastSource = 'k'
client.game.addCsvTag(
'robbedKong%s' % prevMove.meld[1],
diff --git a/src/player.py b/src/player.py
index 9013319..47a2b29 100644
--- a/src/player.py
+++ b/src/player.py
@@ -674,8 +674,8 @@ class PlayingPlayer(Player):
return msg, self.name
self._hand = None
- def robTile(self, tile):
- """used for robbing the kong"""
+ def robTileFrom(self, tile):
+ """used for robbing the kong from this player"""
assert tile.isConcealed
tile = tile.exposed
for meld in self._exposedMelds:
diff --git a/src/server.py b/src/server.py
index e08e4da..9626baa 100644
--- a/src/server.py
+++ b/src/server.py
@@ -615,6 +615,7 @@ class ServerTable(Table):
"""the active player gets a tile from the dead end. Tell all clients."""
requests = self.prioritize(requests)
if requests and requests[0].answer == Message.MahJongg:
+ # somebody robs my kong
requests[0].answer.serverAction(self, requests[0])
else:
self.pickTile(requests, deadEnd=True)
@@ -878,7 +879,7 @@ class ServerTable(Table):
if robbedTheKong:
player.lastSource = 'k'
withDiscard = lastMove.meld[0].concealed
- lastMove.player.robTile(withDiscard)
+ lastMove.player.robTileFrom(withDiscard)
msgArgs = player.showConcealedMelds(concealedMelds, withDiscard)
if msgArgs:
self.abort(*msgArgs) # pylint: disable=star-args
diff --git a/src/visible.py b/src/visible.py
index 630c0ca..c2033ea 100644
--- a/src/visible.py
+++ b/src/visible.py
@@ -143,9 +143,9 @@ class VisiblePlayingPlayer(VisiblePlayer, PlayingPlayer):
if self.voice:
self.voice.speak(text, self.front.rotation())
- def robTile(self, tile):
- """used for robbing the kong"""
- PlayingPlayer.robTile(self, tile)
+ def robTileFrom(self, tile):
+ """used for robbing the kong from this player"""
+ PlayingPlayer.robTileFrom(self, tile)
tile = tile.exposed
hbTiles = self.handBoard.uiTiles
lastDiscard = [x for x in hbTiles if x.tile == tile][-1]