Commit 5c4ab229 authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

Player: changing lastSource now invalidates _hand

parent ae7bdee6
......@@ -141,8 +141,8 @@ class Player(StrMixin):
self.handCache = {}
self.cacheHits = 0
self.cacheMisses = 0
self.__lastSource = TileSource.East14th
self.handBoard = None
def __lt__(self, other):
......@@ -270,13 +270,15 @@ class Player(StrMixin):
return self.__lastSource
def lastSource(self, lastSource):
def lastSource(self, value):
"""the source of the last tile the player got"""
self.__lastSource = lastSource
if lastSource is TileSource.LivingWallDiscard and not
self.__lastSource = TileSource.LivingWallEndDiscard
if lastSource is TileSource.LivingWall and not
self.__lastSource = TileSource.LivingWallEnd
if value is TileSource.LivingWallDiscard and not
value = TileSource.LivingWallEndDiscard
if value is TileSource.LivingWall and not
value = TileSource.LivingWallEnd
if self.__lastSource != value:
self.__lastSource = value
self._hand = None
def nameid(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment