summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 21:40:31 (GMT)
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2016-08-25 21:40:31 (GMT)
commita96379678137e207e27d90fb61ea67e74e1ae962 (patch)
treea9a62ee8a4464c71f8e56fbaf337204fbd00e022
parentfa0211104a098ea871bf9a839fad4b7b568453e0 (diff)
fixes for using the new Wind class
-rw-r--r--src/client.py2
-rw-r--r--src/servertable.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client.py b/src/client.py
index baf0695..cb9fb75 100644
--- a/src/client.py
+++ b/src/client.py
@@ -270,7 +270,7 @@ class Client(pb.Referenceable):
disagree('numbers for played hands: Server:%s, Client:%s' % (
self.table.endValues[0], self.game.handctr))
for player in self.game.players:
- if player.balance != self.table.endValues[1][player.wind]:
+ if player.balance != self.table.endValues[1][player.wind.char]:
disagree('balances for wind %s: Server:%s, Client:%s' % (
player.wind, self.table.endValues[1][player.wind], player.balance))
else:
diff --git a/src/servertable.py b/src/servertable.py
index 1ae3806..be2c54b 100644
--- a/src/servertable.py
+++ b/src/servertable.py
@@ -130,7 +130,7 @@ class ServerTable(Table):
online = tuple(bool(x in onlineNames) for x in names)
if game:
endValues = game.handctr, dict(
- (x.wind, x.balance) for x in game.players)
+ (x.wind.char, x.balance) for x in game.players)
else:
endValues = None
if withFullRuleset:
@@ -154,7 +154,7 @@ class ServerTable(Table):
"""sends a chat messages to all clients"""
if Debug.chat:
logDebug(u'server sends chat msg %s' % chatLine)
- if self.suspendedAt:
+ if self.suspendedAt and self.game:
chatters = []
for player in self.game.players:
chatters.extend(