File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 1010
1111DEFAULT_GAME_CONFIG = {
1212 'game_num_players' : 2 ,
13- 'chips_for_each' : [ 100 ] * 2 ,
13+ 'chips_for_each' : 100 ,
1414 'dealer_id' : None ,
1515 }
1616
@@ -22,8 +22,6 @@ def __init__(self, config):
2222 ''' Initialize the Limitholdem environment
2323 '''
2424 self .name = 'no-limit-holdem'
25- # 'chips_for_each' must have num_players length
26- DEFAULT_GAME_CONFIG ['chips_for_each' ] = [100 ] * config ['game_num_players' ]
2725 self .default_game_config = DEFAULT_GAME_CONFIG
2826 self .game = Game ()
2927 super ().__init__ (config )
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ def configure(self, game_config):
4545 If dealer_id is None, he will be randomly chosen
4646 '''
4747 self .num_players = game_config ['game_num_players' ]
48- self .init_chips = game_config ['chips_for_each' ]
48+ # must have num_players length
49+ self .init_chips = [game_config ['chips_for_each' ]] * game_config ["game_num_players" ]
4950 self .dealer_id = game_config ['dealer_id' ]
5051
5152 def init_game (self ):
You can’t perform that action at this time.
0 commit comments