diff options
| author | 2014-01-14 19:04:11 +0100 | |
|---|---|---|
| committer | 2014-01-14 19:04:11 +0100 | |
| commit | 7f609ac6c679186e15c6a35c2c99fcb0327a1af7 (patch) | |
| tree | f55a51fb3e293004bdef91522a418ebc23dce1b6 | |
| parent | aafb141a168fac070b2fa81d16b62006bb2dfb7a (diff) | |
| download | OneRoll-7f609ac6c679186e15c6a35c2c99fcb0327a1af7.tar.gz OneRoll-7f609ac6c679186e15c6a35c2c99fcb0327a1af7.zip | |
Update README.md
Adding examples
| -rw-r--r-- | README.md | 44 |
1 files changed, 42 insertions, 2 deletions
@@ -1,8 +1,13 @@ -DiceParser -========== + +[](http://www.rolisteam.org) + +# DiceParser + + Rolisteam Dice Parser +## Grammar The grammar is something like this: Command =: Expression @@ -18,3 +23,38 @@ ScalarOperator =: [x,-,*,x,/] number =: [0-9]+ Validator =: number | [operator number] | [ number - number ] + + +## Example: + + +### 3D100 +Roll 3 dice with 100 faces + +### 10D10e[=10]s +Roll 10 dice with 10 faces, 10 exploses, and sort the result. + +### 100291D66666666s +roll 100291 dice with 66666666666 faces and sort result + +### 15D10c[>7] +roll 15 dice with 10 faces and it counts number of dice which are above 7 + +### 1D8+2D6+7 +roll 1 die with 8 faces and add the result to 2 dice with 6 faces and add 7. + +### D25 +roll 1 die with 25 faces + +### 88-1D20 +88 minus the value of 1 die of 20 faces + +### 8+8+8 +compute: 24 + + + +### 100/28*3 +compute: 100/28 = 3 +3*3 = 9 + |