def setUp(self):
     self.line_outcome = outcome.Outcome('Pass Line', 1)
     self.odds_outcome = outcome.Outcome('Pass Line Odds', 1)
     self.strategy_nochange = nochange_betting.NoChangeBetting(
         self.line_outcome)
     self.strategy_martingale = martingale_betting.MartingaleBetting(
         self.odds_outcome)
     self.table = table.Table(5, 1000)
     self.game = craps_game.CrapsGame(table=self.table, dice=dice.Dice())
     self.player = craps_twobetplayer.CrapsTwoBetPlayer(
         self.table, dice.Dice())
     self.player.line_strategy = self.strategy_nochange
     self.player.odds_strategy = self.strategy_martingale
 def setUp(self):
     self.outcome = outcome.Outcome('Pass Line', 1)
     self.strategy_nochange = nochange_betting.NoChangeBetting(self.outcome)
     self.strategy_martingale = martingale_betting.MartingaleBetting(
         self.outcome)
     self.table = table.Table(5, 1000)
     self.game = craps_game.CrapsGame(table=self.table, dice=dice.Dice())
     # self.player = craps_onebetplayer.OneBetPlayer(
     #   table = self.table,
     #   strategy = self.strategy_nochange
     # )
     self.player = craps_onebetplayer.OneBetPlayer(table=self.table,
                                                   dice=dice.Dice())
     self.player.line_strategy = self.strategy_martingale
 def setUp(self):
     self.line_outcome = outcome.Outcome('Pass Line', 1)
     self.odds_outcome = outcome.Outcome('Pass Line Odds', 1)
     self.seven_outcome = outcome.Outcome('Number 7', 4)
     self.strategy_nochange = nochange_betting.NoChangeBetting(
         self.line_outcome)
     self.strategy_bet1326 = bet1326_betting.Craps1326Betting(
         self.odds_outcome)
     self.strategy_martingale = martingale_betting.MartingaleBetting(
         self.seven_outcome)
     self.table = table.Table(5, 1000)
     self.game = craps_game.CrapsGame(table=self.table, dice=dice.Dice())
     self.player = craps_sevencountplayer.CrapsSevenCountPlayer(
         self.table, dice=dice.Dice())
     self.player.line_strategy = self.strategy_nochange
     self.player.odds_strategy = self.strategy_bet1326
     self.player.seven_strategy = self.strategy_martingale
 def setUp(self):
     self.dice = dice.Dice()
     self.outcome1 = outcome.Outcome('Any Craps',3)
     self.outcome2 = outcome.Outcome('Hard 4',30)
     self.outcome3 = outcome.Outcome('Easy 6',10)
     self.throw1 = throw.Throw(1,2)
     self.throw2 = throw.Throw(2,2)
     self.throw3 = throw.Throw(2,4)
     self.dice.rng.seed(1)        
 def setUp(self):
     self.table = table.Table(minimum=1, maximum=450)
     self.dice = dice.Dice()
     self.game = craps_game.CrapsGame(self.dice,self.table)
     self.bets = [
         bet.Bet(5, outcome.Outcome("Pass Line", 1)),
         bet.Bet(10, outcome.Outcome("Any Craps", 31)),
         bet.Bet(50, outcome.Outcome("Odds on Come", 16)),
         bet.Bet(490, outcome.Outcome("Dont Pass Line", 2))
     ]
 def setUp(self):
     self.outcome = outcome.Outcome('Pass Line', 1) 
     self.strategy = nochange_betting.NoChangeBetting(
         self.outcome
     )
     self.table = table.Table(5,1000) 
     self.player = craps_onebetplayer.OneBetPlayer(
       self.table,
       dice.Dice()
     )
     self.player.strategy = self.strategy  
 def test_getThrow(self):
     self.dice = dice.Dice()
     oc_aces = outcome.Outcome('Number 2', 31)
     oc_anycraps = outcome.Outcome('Any Craps', 8)
     oc_horn = outcome.Outcome('Horn', 3.75)
     oc_field = outcome.Outcome('Field', 1.25)
     throw_aces = set([oc_aces,oc_anycraps,oc_horn,oc_field])
     self.assertEqual(self.dice.getThrow(1,1).win_1roll,throw_aces)
     self.assertEqual(self.dice.getThrow(1,1).lose_1roll,set())
     throw_list = []
     for _, val in self.dice.all_throws.items():
         if val.hard():
             throw_list.append('hard' + str(val.d1+val.d2))
         else:
             throw_list.append('easy' + str(val.d1+val.d2))
     print(Counter(throw_list))
 def setUp(self):
     self.throw = throw.ElevenThrow(6, 5)
     self.dice = dice.Dice()
     self.table = table.Table(minimum=1, maximum=1000)
     self.game = craps_game.CrapsGame(self.dice, self.table)
 def setUp(self):
     self.throw_hard = throw.CrapsThrow(1, 1)
     self.throw_easy = throw.CrapsThrow(2, 1)
     self.dice = dice.Dice()
     self.table = table.Table(minimum=1, maximum=1000)
     self.game = craps_game.CrapsGame(self.dice, self.table)
 def setUp(self):
     self.throw = throw.NaturalThrow(3, 4)
     self.dice = dice.Dice()
     self.table = table.Table(minimum=1, maximum=1000)
     self.game = craps_game.CrapsGame(self.dice, self.table)