summaryrefslogtreecommitdiff
path: root/DiscoBot/Auxiliary/Dice.cs
diff options
context:
space:
mode:
authoruzvkl <dennis.kobert@student.kit.edu>2019-06-11 23:05:52 +0200
committeruzvkl <dennis.kobert@student.kit.edu>2019-06-11 23:05:52 +0200
commite6181c24124d97f2fbc932b8a68311e625463156 (patch)
treec1f097c344ca266b7941c9668590b0fd35c7870a /DiscoBot/Auxiliary/Dice.cs
parent2490ad5d31fe2ac778ff9303776f0e91f47a2862 (diff)
Move dsa related stuff to subfolder
Diffstat (limited to 'DiscoBot/Auxiliary/Dice.cs')
-rw-r--r--DiscoBot/Auxiliary/Dice.cs31
1 files changed, 0 insertions, 31 deletions
diff --git a/DiscoBot/Auxiliary/Dice.cs b/DiscoBot/Auxiliary/Dice.cs
deleted file mode 100644
index f0f4def..0000000
--- a/DiscoBot/Auxiliary/Dice.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-
-namespace DiscoBot.Auxiliary
-{
- public static class Dice // roll it!
- {
- private static readonly Random Rnd = new Random();
-
- public static int Roll(int d = 20)
- {
- return Rnd.Next(d) + 1;
- }
-
-
- public static int Roll(int count, int d)
- {
- if (d <= 0) return 0;
-
- var sum = 0;
- for (var i = 0; i < Math.Abs(count); i++)
- {
- var roll = Roll(d);
- sum += roll;
- }
-
- sum *= Math.Abs(count) / count;
-
- return sum;
- }
- }
-} \ No newline at end of file