Skip to content

Instantly share code, notes, and snippets.

@saterus
Last active August 29, 2015 14:25
Show Gist options
  • Save saterus/67ad3d2dd81e83b7c6f0 to your computer and use it in GitHub Desktop.
Save saterus/67ad3d2dd81e83b7c6f0 to your computer and use it in GitHub Desktop.
Rust Dice Rolling Kata

Dice Roller

Goal

Take a simple idea, package it up in different ways.

Get experience with:

* Cargo
* Tests
* External crates
* Reading docs
* Packaging Mechanisms
* Accepting options/arguments

Phases

  1. Dice Rolling Library (crate):

    1. tests
    2. 1d6
    3. tests
    4. nd6
    5. tests
    6. ndX
  2. Dice Rolling Executable:

  3. Rolls 1d6 & prints result

  4. Accepts number of die and sides of die, rolls them, prints them per line

  5. Dice Rolling Service (iron)

  6. Accepts a request & returns a 1d6 result

  7. Accepts ndX options & returns results as json array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment