duk3luk3 / botmath

A small calculator language with dicerolls

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

botmath

A small calculator language with dicerolls

Example usage

~/git/botmath/botmath(master)$ python2
Python 2.7.8 (default, Sep 24 2014, 18:58:24) 
[GCC 4.9.1 20140903 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import botmath as bm
>>> b = bm.BotMath()
>>> b.parse("5+5")
10
>>> b.parse("(3d6+5) / 2")
8
>>> b.parse("(3d6+5) / 2")
8
>>> b.parse("(3d6+5) / 2")
6
>>> b.parse("(3d6+5) / 2")
6

About

A small calculator language with dicerolls

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%