diff options
| author | 2025-09-12 19:02:00 +0800 | |
|---|---|---|
| committer | 2025-09-12 19:02:00 +0800 | |
| commit | 2e7cff9561b439485d3bff4d0cad4d0251ee7d24 (patch) | |
| tree | e23e8b575c718a230670482a3590da8c85fd0508 | |
| parent | 0aafea34595cffa5eaeb951ba3c18d04c46eb3a7 (diff) | |
| download | OneRoll-2e7cff9561b439485d3bff4d0cad4d0251ee7d24.tar.gz OneRoll-2e7cff9561b439485d3bff4d0cad4d0251ee7d24.zip | |
chore: remove README.rst as part of project restructuring
| -rw-r--r-- | README.md (renamed from README.rst) | 53 |
1 files changed, 28 insertions, 25 deletions
@@ -9,6 +9,7 @@ Overview OneRoll is a high-performance dice expression parser and roller, implemented in Rust and exposed to Python via PyO3. It supports complex dice expressions, modifiers, mathematical operations, and user comments. Features + -------- - Basic dice rolling (XdY) @@ -24,23 +25,23 @@ Features Installation ------------ -.. code-block:: shell - - pip install oneroll +```shell +pip install oneroll +``` Or build from source: -.. code-block:: shell - - maturin build - pip install target/wheels/oneroll-*.whl +```shell +maturin build +pip install target/wheels/oneroll-*.whl +``` Usage ----- Python SDK Example: -.. code-block:: python +```python import oneroll @@ -55,19 +56,21 @@ Python SDK Example: # Use OneRoll class roller = oneroll.OneRoll() result = roller.roll("2d6! # Exploding dice") +``` Command Line Example: -.. code-block:: shell +```shell - python -m oneroll "3d6 + 2" - python -m oneroll --stats "3d6" --times 100 +python -m oneroll "3d6 + 2" +python -m oneroll --stats "3d6" --times 100 +``` Terminal UI: -.. code-block:: shell - - python -m oneroll.tui +```shell +python -m oneroll.tui +``` Dice Expression Syntax ---------------------- @@ -80,20 +83,20 @@ Dice Expression Syntax Examples -------- -.. code-block:: python +```python +# Basic +result = oneroll.roll("3d6 + 2") - # Basic - result = oneroll.roll("3d6 + 2") - - # D&D attribute roll - result = oneroll.roll("4d6kh3 # Attribute") +# D&D attribute roll +result = oneroll.roll("4d6kh3 # Attribute") - # Statistical analysis - stats = oneroll.roll_statistics("3d6", 100) +# Statistical analysis +stats = oneroll.roll_statistics("3d6", 100) - # Comment usage - result = oneroll.roll("1d20 + 5 # Attack check") - print(result["comment"]) +# Comment usage +result = oneroll.roll("1d20 + 5 # Attack check") +print(result["comment"]) +``` Documentation ------------- |
