def _doTransferWealth(self,fromAgent,toAgent): stock = random.choice(self.stocks) price = self.currentPrices[stock] agents.transferStock(fromAgent,toAgent,stock,price,amount=1)
def transaction(): return agents.transferStock(fromAgent, toAgent, stock, price)