Ideally, between rounds of poker, the dealer button should be passed around.
My first instinct on how to fix this, is making the buttonPlayerIndex a field of poker as well as round, and then have round's runRound() return the self.players and the self.buttonPlayerIndex, so that poker knows what to do with it. buttonPlayerIndex should also be passed as an argument to the round constructor so that each round knows what to do with it.
Ideally, between rounds of poker, the dealer button should be passed around. My first instinct on how to fix this, is making the
buttonPlayerIndex
a field ofpoker
as well asround
, and then have round'srunRound()
return theself.players
and theself.buttonPlayerIndex
, so thatpoker
knows what to do with it.buttonPlayerIndex
should also be passed as an argument to theround
constructor so that each round knows what to do with it.