def poiDetail(self): if stash.poiIds: poiId = utils.weightedChoice(stash.poiIds) utils.ajustWeight(stash.poiIds, poiId) result = PoiBehavior.poiDetail(self.client, poiId) utils.statWeight(stash.cardIds, result["cards"]) utils.statWeight(stash.poiIds, result["pois"])
def backpack(self): if stash.backpackIds: backpackId = utils.weightedChoice(stash.backpackIds) utils.ajustWeight(stash.backpackIds, backpackId) result = BackpackBehavior.backpackPage(self.client, backpackId) utils.statWeight(stash.cardIds, result["cards"]) utils.statWeight(stash.poiIds, result["pois"]) utils.statWeight(stash.destinationIds, result["destinations"])
def destinationDetial(self): if stash.destinationIds: destId = utils.weightedChoice(stash.destinationIds) utils.ajustWeight(stash.destinationIds, destId) result = DestinationBehavior.destinationDetial(self.client, destId) utils.statWeight(stash.cardIds, result["cards"]) utils.statWeight(stash.userIds, result["users"]) utils.statWeight(stash.boxIds, result["boxes"])
def userHome(self): if stash.userIds: userId = utils.weightedChoice(stash.userIds) utils.ajustWeight(stash.userIds, userId) result = UserBehavior.userHome(self.client, userId) utils.statWeight(stash.cardIds, result["cards"]) utils.statWeight(stash.boxIds, result["boxes"]) utils.statWeight(stash.backpackIds, result["backpacks"])
def cardDetail(self): if stash.cardIds: cardId = utils.weightedChoice(stash.cardIds) utils.ajustWeight(stash.cardIds, cardId) result = CardBehavior.cardDetail(self.client, cardId) utils.statWeight(stash.cardIds, result["cards"]) utils.statWeight(stash.boxIds, result["boxes"]) if result.get("pois"): utils.statWeight(stash.poiIds, result["pois"]) if result.get("destinations"): utils.statWeight(stash.destinationIds, result["destinations"])
def boxHome(self): if stash.boxIds: boxId = utils.weightedChoice(stash.boxIds) utils.ajustWeight(stash.boxIds, boxId) result = BoxBehavior.boxHome(self.client, boxId) utils.statWeight(stash.cardIds, result["cards"])