示例#1
0
    def _set_bet_and_wager(self):
        self.bet = 1
        self.wager = []

        for arg in self.args:
            if arg in SoundeffectsLibrary.soundeffects_only():
                self.wager.append(arg)

            if self._is_valid_bet(arg):
                if isinstance(arg, int):
                    self.bet = arg
                elif arg.endswith("s"):
                    self.bet = int(arg[:-1])
                else:
                    self.bet = int(arg)
示例#2
0
def random_soundeffect():
    return random.sample(SoundeffectsLibrary.soundeffects_only(), 1)[0]
示例#3
0
 def unavailable_sounds(self):
     total_sfx = len(SoundeffectsLibrary.soundeffects_only())
     return total_sfx - self.available_sounds()
    def _is_sfx(self, sfx):
        if self.allow_random_sfx and sfx == "random":
            return True

        return sfx in SoundeffectsLibrary.soundeffects_only()