From e6181c24124d97f2fbc932b8a68311e625463156 Mon Sep 17 00:00:00 2001 From: uzvkl Date: Tue, 11 Jun 2019 23:05:52 +0200 Subject: Move dsa related stuff to subfolder --- DiscoBot/Auxiliary/Dice.cs | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 DiscoBot/Auxiliary/Dice.cs (limited to 'DiscoBot/Auxiliary/Dice.cs') 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 -- cgit v1.2.3-70-g09d2