- Apr 28, 2016
-
-
ulif authored
-
- Apr 25, 2016
-
-
ulif authored
Add a common place where components can write messages to. Any userinterface can decide, what messages should be visible (depending on their severity).
-
- Apr 24, 2016
-
-
ulif authored
-
ulif authored
With one item in sequence we do not have to roll dice. This holds for all sorts of dice.
-
ulif authored
The moved comment was at the wrong place.
-
ulif authored
I guess it is obvious, how the first if-clause works.
-
ulif authored
We can simply do the (cheap) modulo operation after each die role.
-
- Apr 20, 2016
-
-
ulif authored
Use multiples of 4 as indent, shorten overlong lines and fix other minor things to keep pep8-conformity.
-
- Apr 19, 2016
-
-
dwcoder authored
Move the calculations out of the `pre_check()` function. Also do smarter checks: - If len(sequence) == 1, we don't need any rolls. In this case, just return sequence[0] - If len(sequence) is a factor of dice_sides, we only need one roll along with the modulo operator. - For everything else, just require one extra roll, bringing it to a total of 2 rolls. This should remove a little bit of the edge bias introduced by the modulo Run the `pre_check()` function after the calculations have been done. For the unit tests: - remove the function `test_choice_len_too_short()`; we no longer have to raise an exception when the sequence length is too short. - Write new tests for the cases where `dice_sides = 6` and `len(sequence)`: - 1 - 2,3 - 4,5
-
- Apr 17, 2016
-
-
dwcoder authored
Add an if to the pre_check that catches cases where there are less items to choose from than sides on the die. If this is the case, we can still pick items, but we have to use a modulo. Pick the `num_rolls` so that the result generated after rolling is larger than `100*len(sequence)`. The `pre_check()` function now has to return the modified `num_rolls` as well as a boolean to indicate whether modulo needs to be applied on the result.
-
ulif authored
-
- Apr 16, 2016
-
-
ulif authored
Use `.asc` filename extension for signed wordlists.
-
- Apr 15, 2016
-
-
Heartsucker authored
also updated README Fixes #16
-
- Apr 14, 2016
-
-
heartsucker authored
-
- Apr 13, 2016
-
-
Heartsucker authored
-
- Mar 22, 2016
-
-
ulif authored
-
- Mar 20, 2016
-
-
ulif authored
-
- Nov 16, 2015
-
-
ulif authored
Normally, it would be more concise to use the more declarative name. "en_8k" tells, how many terms we find in this wordlist. But as the wordlist names are used in the CLI and users will normally simply look for a wordlist in their language, it can help to keep the name of the "default" list for each language short. We pick the 8K lists for "default" (and not the "original" 6^5 lists), because we assume that normally people will use diceware without dice. Also most other sources of randomness will most probably work on a 2^x basis rather than in 6^x (and therefore have better use for 8k lists over other ones).
-
- Nov 14, 2015
-
-
ulif authored
We do support configuration files from now on.
-
- Nov 13, 2015
-
-
ulif authored
-
- Nov 12, 2015
- Nov 11, 2015
-
-
ulif authored
We have to check for boolean before int, because int is also a valid boolean.
-
ulif authored
-
ulif authored
Older python versions (< 3.x?) do not support item assignments with config parser instances. We have to workaround therefore.
-
ulif authored
-
ulif authored
-
ulif authored
-
ulif authored
We can build a sensible list of config file locations on-the-fly.
-
ulif authored
-
- Nov 10, 2015
-
-
ulif authored
-
- Nov 09, 2015
- Nov 05, 2015
- Nov 02, 2015
-
-
ulif authored
-
- Aug 03, 2015