summaryrefslogtreecommitdiff
path: root/DiscoBot/Auxiliary/SpellCorrect.cs
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-06-07 02:35:19 +0200
committerTrueDoctor <d-kobert@web.de>2018-06-07 02:35:19 +0200
commit8b2cd65526f7535ab43266653bd1146add8bd880 (patch)
tree57e0941cfab44d8720dc8f0aed5cee4e695b6176 /DiscoBot/Auxiliary/SpellCorrect.cs
parent111b46289213b293f0977060588a90f880b3852e (diff)
Added generic Help system
added EasyCompare as static method
Diffstat (limited to 'DiscoBot/Auxiliary/SpellCorrect.cs')
-rw-r--r--DiscoBot/Auxiliary/SpellCorrect.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/DiscoBot/Auxiliary/SpellCorrect.cs b/DiscoBot/Auxiliary/SpellCorrect.cs
index 4f4f7d0..01cce62 100644
--- a/DiscoBot/Auxiliary/SpellCorrect.cs
+++ b/DiscoBot/Auxiliary/SpellCorrect.cs
@@ -10,6 +10,11 @@
public override int Compare(string x, string y)
{
+ return CompareEasy(x, y);
+ }
+
+ public static int CompareEasy(string x, string y)
+ {
if (string.IsNullOrEmpty(x))
{
throw new ArgumentException("message", nameof(x));
@@ -47,7 +52,7 @@
return score + 1;
}
- return 100000 - (int)(this.CompareExact(x, y) * 1000.0);
+ return 100000 - (int)(CompareExact(x, y) * 1000.0);
/*if (y.Contains(x))
return 6;*/
}
@@ -63,7 +68,7 @@
throw new NotImplementedException();
}
- public double CompareExact(string s, string q)
+ public static double CompareExact(string s, string q)
{
s = s.ToLower();