コード例 #1
0
ファイル: explore.py プロジェクト: powerlang/Pieceful_Stress
 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 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"])
コード例 #4
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"])
コード例 #5
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"])
コード例 #6
0
ファイル: explore.py プロジェクト: powerlang/Pieceful_Stress
 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"])
コード例 #7
0
ファイル: explore.py プロジェクト: powerlang/Pieceful_Stress
 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"])
コード例 #8
0
ファイル: explore.py プロジェクト: powerlang/Pieceful_Stress
 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"])
コード例 #9
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"])
コード例 #10
0
ファイル: explore.py プロジェクト: powerlang/Pieceful_Stress
 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"])
コード例 #11
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"])
コード例 #12
0
ファイル: play.py プロジェクト: phylan/tweetball
	def genResult(self):
	
		return weightedChoice(self.__dict__)
コード例 #13
0
ファイル: explore.py プロジェクト: powerlang/Pieceful_Stress
 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"])