Warning

This documentation is for an unreleased version of MPF!

This is the developer documentation for MPF 0.51, which is the “dev” (next) release of MPF that is a work-in-progress. Use the “Read the Docs” link in the lower left corner to view the developer docs for the version of MPF you’re using.

Randomizer

class mpf.core.randomizer.Randomizer(items)

Bases: object

Generic list randomizer.

Methods & Attributes

The Randomizer has the following methods & attributes available. Note that methods & attributes inherited from the base class are not included here.

get_current()

Return current item.

get_next()

Return next item.

loop

Return loop property.

static pick_weighted_random(items)

Pick a random item.

Parameters:items – Items to select from