Esempio n. 1
0
 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"])
Esempio n. 2
0
 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"])
Esempio n. 3
0
 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"])
Esempio n. 4
0
 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"])
Esempio n. 5
0
 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"])
Esempio n. 6
0
 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"])
Esempio n. 7
0
 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"])
Esempio n. 8
0
 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"])
Esempio n. 9
0
 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"])
Esempio n. 10
0
 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"])
Esempio n. 11
0
 def explore(cls, session):
     exploreData = ExploreBehavior.index(session)
     stash.cardIds = {}
     stash.poiIds = {}
     stash.destinationIds = {}
     stash.userIds = {}
     stash.boxIds = {}
     stash.backpackIds = {}
     utils.statWeight(stash.cardIds, exploreData.get("cardIds", []))
     utils.statWeight(stash.userIds, exploreData.get("userIds", []))
     utils.statWeight(stash.boxIds, exploreData.get("boxIds", []))
Esempio n. 12
0
 def explore(cls, session):
     exploreData = ExploreBehavior.index(session)
     stash.cardIds = {}
     stash.poiIds = {}
     stash.destinationIds = {}
     stash.userIds = {}
     stash.boxIds = {}
     stash.backpackIds = {}
     utils.statWeight(stash.cardIds, exploreData.get("cardIds", []))
     utils.statWeight(stash.userIds, exploreData.get("userIds", []))
     utils.statWeight(stash.boxIds, exploreData.get("boxIds", []))
Esempio n. 13
0
 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"])
Esempio n. 14
0
 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"])