ichabod801 / t_games

A collection of command-line interface games written in Python.
GNU General Public License v3.0
21 stars 4 forks source link

Bug with Ten Thousand Zen Option #495

Closed ichabod801 closed 4 years ago

ichabod801 commented 4 years ago

Playing with options = must-score straight=2000 zen=500. Got zen, and this error popped up:


Buckaroo rolled: 2, 2, 3, 3, 6, 6.
Buckaroo did not score with that roll.
How Zen.
Traceback (most recent call last):
...
  File "C:\Users\Craig\Documents\t_games\dice_games\ten_thousand_game.py", line 1178, in player_action
    if not self.do_roll(''):
  File "C:\Users\Craig\Documents\t_games\dice_games\ten_thousand_game.py", line 1007, in do_roll
    self.do_hold('')
  File "C:\Users\Craig\Documents\t_games\dice_games\ten_thousand_game.py", line 873, in do_hold
    counts = free.counts()
  File "C:\Users\Craig\Documents\t_games\dice.py", line 662, in counts
    counts = [0] * (max(self.dice[0].sides)  + 1)
IndexError: list index out of range
ichabod801 commented 4 years ago

The zen option is working now, although it was really a problem with Pool.counts.