diff options
Diffstat (limited to 'abacus_window.py')
-rw-r--r-- | abacus_window.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/abacus_window.py b/abacus_window.py index 9de0271..06cb8be 100644 --- a/abacus_window.py +++ b/abacus_window.py @@ -205,6 +205,7 @@ class Abacus(): self.binary = Binary(self) self.hex = Hex(self) self.fraction = Fractions(self) + self.custom = None self.chinese.show() self.japanese.hide() @@ -562,6 +563,21 @@ class AbacusGeneric(): self.beads[i+ii].move_down() +class Custom(AbacusGeneric): + """ A custom-made abacus """ + + def __init__(self, abacus, rods, top, bottom, factor, base): + """ Specify parameters that define the abacus """ + self.abacus = abacus + self.name = 'custom' + self.num_rods = rods + self.bot_beads = bottom + self.top_beads = top + self.base = base + self.top_factor = factor + self.create() + + class Nepohualtzintzin(AbacusGeneric): """ A Mayan abacus """ |