ichabod801 / t_games

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

Conflict between dice.Pool.roll and dice.Pool.sort #226

Closed ichabod801 closed 6 years ago

ichabod801 commented 6 years ago

Sorting changes the values without changing the order of the dice. If you then roll using an index, it assumes the Die and the value are in the same place, which may no longer be true.

It seems the way to fix this is to have held be a list of flags. But then sorting the flags based on the sort of values becomes an issue. No, that can be done with zip. But that highlights that held should maybe be an attribute of the die.

Child of issue #225: Expand dice_test.py.

ichabod801 commented 6 years ago

Games that hold dice (and need to be checked for rewrites): Yacht

Games that use a dice pool (and need to be tested): Backgammon, Liar's Dice, Solitaire Dice, Craps

ichabod801 commented 6 years ago

User testing and interface review are done.

ichabod801 commented 6 years ago

Docboxing is done for this issue.