Skip to content

Commit

Permalink
Fix a few typos in rpg.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamrick committed Jul 6, 2014
1 parent b054693 commit 2462ae1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sampler/rpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ def __init__(self, bonus_probs, stats_probs, rso=None):
The random number generator
"""
# Store the given parameters, in addition to the log of the
# bonus probabilities (which are used by _bonus_logpmf).
# Create the multinomial distributions we'll be using
self.bonus_dist = MultinomialDistribution(bonus_probs, rso=rso)
self.stats_dist = MultinomialDistribution(stats_probs, rso=rso)

Expand Down Expand Up @@ -207,16 +206,16 @@ def __init__(self, num_items, item_dist,
"""
# This is an array of integers corresponding to the sides of a
# single die. The `dice_probs` are equal probabilities for
# each of the sides.
# single die.
self.dice_sides = np.arange(1, num_dice_sides + 1)
# Create a multinomial distribution corresponding to one of
# these dice. Each side has equal probabilities.
self.dice_dist = MultinomialDistribution(
np.ones(num_dice_sides) / float(num_dice_sides), rso=rso)

self.num_hits = num_hits
self.num_items = num_items
self.item_dist = item_dist
self.rso = rso

def sample(self):
"""Sample the attack damage.
Expand Down

0 comments on commit 2462ae1

Please sign in to comment.