示例#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"])
示例#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"])
示例#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"])
示例#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"])
示例#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"])
示例#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"])
示例#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"])
示例#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"])
示例#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"])
示例#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"])
示例#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", []))
示例#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", []))
示例#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"])
示例#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"])