def gamble_bet_bet(self): Common.set_xd(self.uid, 1200000) Common.set_money(self.uid, 0, 1200000) kw = dict(uid=self.uid, period=self.period, chose='option_A', coin_type='cat_bean', amount=200000) events = [] for i in self.uids: events.append(gevent.spawn(bet, **kw)) gevent.joinall(events)
def gamble_settlement_settlement(self): Common.set_xd(self.uid, 200) Common.set_money(self.uid, 0, 200) Common.set_xd(1523, 200) Common.set_money(1523, 0, 200) bet(uid=self.uid, period=self.period, chose='option_A', coin_type='free_bean', amount=100) bet(uid=1523, period=self.period, chose='option_B', coin_type='free_bean', amount=100) events = [] for i in self.uids: events.append( gevent.spawn(settlement, period=self.period, win_option='option_B')) gevent.joinall(events)
def add(self): for uid in self.uids: Common.set_xd(uid, 100000) Common.set_money(uid, 100000, 100000)