summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2015-11-30 09:19:33 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 06:41:37 (GMT)
commitae42cc62b3ad944f63adb4b436f32d17b67487e7 (patch)
treedc8e0eadc88b8b5c29b53f48a9411d8d61da95c8
parent4b9febb1a21383806aad99ca7d6cfa86cfcb160c (diff)
Server: remove code duplication
-rw-r--r--src/server.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/server.py b/src/server.py
index f8def36..0eaf272 100644
--- a/src/server.py
+++ b/src/server.py
@@ -604,18 +604,12 @@ class ServerTable(Table):
Message.PickedTile,
tile=tile,
deadEnd=deadEnd)
- if tile.isBonus or self.game.playOpen:
- block.tellOthers(
- player,
- Message.PickedTile,
- tile=tile,
- deadEnd=deadEnd)
- else:
- block.tellOthers(
- player,
- Message.PickedTile,
- tile=Tile.unknown,
- deadEnd=deadEnd)
+ showTile = tile if tile.isBonus or self.game.playOpen else Tile.unknown
+ block.tellOthers(
+ player,
+ Message.PickedTile,
+ tile=showTile,
+ deadEnd=deadEnd)
block.callback(self.moved)
def pickKongReplacement(self, requests=None):