def setUp(self): self.manager = game.Manager(game.Configuration()) # We'll create players in postiions 0, 2, 3, and 7 for idx in range(self.manager.config.max_players): self.manager.add_player(game.Player("name{}".format(idx), 0)) for idx in [1, 4, 5, 6, 8, 9]: self.manager.remove_player(idx)
def setUp(self): self.manager = game.Manager(game.Configuration(ante=100)) # We'll create players in postiions 0, 1 for idx in range(2): self.manager.add_player(game.Player("name{}".format(idx), 500)) # Add the recorder last because we don't care about the add events. self.recorder = game.RecordingListener() self.manager.add_listener(self.recorder)
def setUp(self): self.manager = game.Manager(game.Configuration(ante=100)) # We'll create players in postiions 0, 2, 4 for idx in range(5): self.manager.add_player(game.Player("name{}".format(idx), 1000)) for idx in [1, 3]: self.manager.remove_player(idx) self.recorder = game.RecordingListener() self.manager.add_listener(self.recorder)
def initialize(self, config): self.manager = game.Manager(config) # We'll create players in postiions 0, 1, 2 for idx in range(3): self.manager.add_player(game.Player("name{}".format(idx), 1000)) self.manager.button_pos = 2 self.manager.start_game() self.assertEqual(0, self.manager.button_pos) self.manager.proceed() self.assertEqual(game.GameState.HOLE_CARDS_DEALT, self.manager.state)
def setUp(self): self.manager = game.Manager(game.Configuration()) self.manager._deck_factory = in_order_deck_factory # We'll create players in postiions 0, 2, 4 for idx in range(5): self.manager.add_player(game.Player("name{}".format(idx), 0)) for idx in [1, 3]: self.manager.remove_player(idx) # Add the recorder last because we don't care about the add/remove events. self.recorder = game.RecordingListener() self.manager.add_listener(self.recorder) # we do long string diffs self.maxDiff = None
def setUp(self): self.manager = game.Manager(game.Configuration(max_players=4, game_type=game.GameType.LIMIT, limits=[10,20], blinds=[5, 10])) self.manager._deck_factory = in_order_deck_factory # We'll create players in postiions 0, 1, 2 for idx in range(3): self.manager.add_player(game.Player("name{}".format(idx), 1000)) # Button will be advanced to 0 self.manager.button_pos = 3 self.recorder = game.RecordingListener() self.manager.add_listener(self.recorder) # we do long string diffs self.maxDiff = None
def setUp(self): self.manager = game.Manager(game.Configuration()) self.recorder = game.RecordingListener() self.manager.add_listener(self.recorder)