We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c89836 commit 532d6c2Copy full SHA for 532d6c2
7 files changed
xtra/DICE.LUA
@@ -1,5 +1,10 @@
1
#!/usr/bin/env lua
2
3
+-- sides = The amount of sides a dice has
4
+-- dice = The amount of dice to roll
5
+-- roll = The amount of times to roll the dice
6
sides, dice, roll = tonumber(arg[2]) or 6, tonumber(arg[1]) or 1, {}
-for _ = 1, dice do table.insert(roll, math.floor(math.random(1, sides))) end
7
+for _ = 1, dice do
8
+ table.insert(roll, math.floor(math.random(1, sides)))
9
+end
10
print("Dice rolled: " .. table.concat(roll, ", "))
0 commit comments