skent259 / crapssim

Simulator for craps with various betting strategies
MIT License
28 stars 13 forks source link

Dont Come #35

Closed cthomaschase closed 1 year ago

cthomaschase commented 1 year ago

Hi,

Is there a way to simulate the "Don't Come" bet?

skent259 commented 1 year ago

Yes, it got added in the dev branch which hasn't yet been merged (been super busy, sorry). https://github.com/skent259/crapssim/commit/217d34d602f1c7f4c900e8a495e260882fcf8c94

You can add the following lines to any script in which you need to simulate the Don't Come bet:

 class DontCome(DontPass):
     def __init__(self, bet_amount):
         super().__init__(bet_amount)
         self.name = "DontCome"

     def _update_bet(self, table_object, dice_object):
         status, win_amount = super()._update_bet(table_object, dice_object)
         if not self.prepoint and self.subname == "":
             self.subname = "".join(str(e) for e in self.losing_numbers)
         return status, win_amount