We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
DICE.LUA
1 parent 6b848be commit d99b2e4Copy full SHA for d99b2e4
demo/xtra/DICE.LUA
@@ -0,0 +1,5 @@
1
+#!/usr/bin/env lua
2
+
3
+sides = tonumber(arg[2]) or 6 dice = tonumber(arg[1]) or 1 roll = {}
4
+for _ = 1, dice do table.insert(roll, math.floor(math.random(1, sides))) end
5
+print("Dice rolled: " .. table.concat(roll, ", "))
0 commit comments