Skip to content

Commit

Permalink
small doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-s-s committed Nov 30, 2020
1 parent 698c553 commit 76db7a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -209,7 +209,7 @@ v2.6.0

.. _`The Dice` : http://dice-tables.readthedocs.io/en/latest/the_dice.html
.. _`DicePool` : http://dice-tables.readthedocs.io/en/latest/the_dice.html#module-dicetables.bestworstmid
.. _`DicePool` : http://dice-tables.readthedocs.io/en/latest/the_dice.html#dice-pools
v2.5.0
Expand Down
2 changes: 1 addition & 1 deletion dicetables/tools/limit_checker.py
Expand Up @@ -49,7 +49,7 @@ def assert_numbers_of_calls_within_limits(
) -> None:
"""
asserts that the number of `dicetables.ProtoDie` calls and the number of
`dicetables.bestworstmid.DicePool` calls are within limits.
`dicetables.dicepool.DicePool` calls are within limits.
:raises LimitsError:
"""
Expand Down
20 changes: 10 additions & 10 deletions docs/the_dice.rst
Expand Up @@ -210,15 +210,10 @@ True
Dice Pools
----------

Dice Pools are a pool of a single die. Dice Pool Collections are lightweight wrappers around a DicePool.
They are a way to extract rolls from a Dice Pool and cast it as a :code:`ProtoDie`.
The collections are treated as one giant Die with very funky rolling behavior. They all follow the basic form:
:code:`<WhatToSelect>OfDicePool(pool=DicePool(input_die, pool_size), select)`.
:code:`BestOfDicePool(DicePool(Die(6), 4), 3)` means: Make a dice pool of 4D6. Roll this
and take the best three results from every roll. This object is also an 18-sided "Die" that rolls from 3 to 18.

:code:`DicePools` can be expensive to instantiate, but they are immutable and can be use in several
DicePoolCollections which are a lightweight wrapper around the DicePool.
:code:`DicePool` s are a pool of a single die. :code:`DicePoolCollection` s are lightweight wrappers around a DicePool.
They are a way to extract rolls from a Dice Pool and cast it as a :code:`ProtoDie`. :code:`DicePool` can be expensive
to instantiate, which is explained below. They are immutable and a single instance can be passed to many
collections.

.. module:: dicetables.dicepool

Expand All @@ -227,6 +222,11 @@ DicePoolCollections which are a lightweight wrapper around the DicePool.
:undoc-members:


The collections are treated as one giant Die with very funky rolling behavior. They all follow the basic form:
:code:`<WhatToSelect>OfDicePool(pool=DicePool(input_die, pool_size), select=<int>)`.
:code:`BestOfDicePool(DicePool(Die(6), 4), 3)` means: Make a dice pool of 4D6. Roll this
and take the best three results from every roll. This object is also an 18-sided "Die" that rolls from 3 to 18.

.. module:: dicetables.dicepool_collection

.. autoclass:: DicePoolCollection
Expand Down Expand Up @@ -262,7 +262,7 @@ the following dictionary
True

This says that, with 3*Die(3), the roll: (1, 1, 1) happens once. The roll: (1, 2, 3) happens 6 times.
:code: `BestOfDicePool(DicePool(Die(3), 3), 2)` looks at the above dictionary and selects the two best
:code:`BestOfDicePool(DicePool(Die(3), 3), 2)` looks at the above dictionary and selects the two best
rolls in each tuple. so:

>>> best_two = dt.BestOfDicePool(pool, 2)
Expand Down
4 changes: 2 additions & 2 deletions time_trials/dicepool_times.py
Expand Up @@ -6,7 +6,7 @@
import matplotlib.pyplot as plt

from dicetables.tools.orderedcombinations import count_unique_combination_keys
from dicetables import BestOfDicePool, Die
from dicetables import DicePool, Die


def get_max_combinations(die):
Expand Down Expand Up @@ -40,7 +40,7 @@ def make_plots():
pool_entries = count_unique_combination_keys(die, pool_size)
while pool_entries < limit:
start = perf_counter()
BestOfDicePool(die, pool_size, pool_size - 1)
DicePool(die, pool_size)
elapsed = perf_counter() - start

xs.append(pool_entries)
Expand Down

0 comments on commit 76db7a5

Please sign in to comment.