setting holecards for a player is now idempotent

This commit is contained in:
Matt Turnbull 2008-12-11 17:35:44 +00:00
parent 7500bcdf92
commit b34c0e1300

View File

@ -332,8 +332,7 @@ Note, will automatically uppercase the rank letter.
"""
try:
self.checkPlayerExists(player)
for c in cards:
self.holecards[player].append(self.card(c))
self.holecards[player] = set([self.card(c) for c in cards])
except FpdbParseError, e:
print "Tried to add holecards for unknown player: %s" % (player,)