Throwing dice

Algorithmia Platform License

Run an Example

{
  "(1) 8d12": {
    "total": 55,
    "throws": [
      11,
      5,
      7,
      9,
      7,
      3,
      7,
      6
    ]
  },
  "(4) 10d4": {
    "total": 29,
    "throws": [
      4,
      2,
      2,
      3,
      4,
      3,
      3,
      3,
      4,
      1
    ]
  },
  "(3) 3d100": {
    "total": 243,
    "throws": [
      75,
      81,
      87
    ]
  },
  "(0) 3d6": {
    "total": 5,
    "throws": [
      2,
      1,
      2
    ]
  },
  "(2) 5d20": {
    "total": 58,
    "throws": [
      13,
      5,
      12,
      15,
      13
    ]
  },
  "(5) 4d6": {
    "total": 15,
    "throws": [
      4,
      4,
      1,
      6
    ]
  }
}

Install & Use

Use

curl -X POST -d '[
	{"max" : 6, "n" : 3}, 
	{"max" : 12, "n" : 8}, 
	{"max" : 20, "n" : 5}, 
	{"max" : 100, "n" : 3}, 
	{"max" : 4, "n" : 10}, 
	{"max" : 6, "n" : 4}
]' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/malguzt/throwing_dice/0.1.0