-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stub documentation for DeckModules and Mixtures.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
def Mixture(): | ||
""" | ||
You must define your ingredients and their locations before referring | ||
to them within mixtures. Use the allocate method for this. | ||
Allocations: | ||
>>> wellA.allocate(red_food_coloring=100) | ||
>>> wellB.allocate(water=100) | ||
>>> wellC.allocate(blue_food_coloring=100) | ||
Mixture Definitions: | ||
>>> red = Mixture('red', water=98, red_food_coloring=2) | ||
>>> blue = Mixture('blue', water=98, blue_food_coloring=2) | ||
>>> purple = Mixture('purple', blue=50, red=50) | ||
Then you can do: | ||
>>> well.acquire(purple=10) | ||
And the system can just figure out where to find 1ul red, | ||
1ul blue, 9.8ul water and add it to that particular well. | ||
""" | ||
|
||
def __init__(self, name, **kwargs): | ||
""" | ||
Defines a mixture by proportions (in percentages as ints, | ||
since floating points are a pain). | ||
The name must be unique, and will be added to the global | ||
registry of names for a given deck loadout. | ||
""" |