From 82f07c959dc7a87251b4617e462003471e3cc071 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Mon, 9 Apr 2018 00:54:19 +0200 Subject: Refactoring and Cleanup --- DiscoBot/Auxiliary/Talent.cs | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 DiscoBot/Auxiliary/Talent.cs (limited to 'DiscoBot/Auxiliary/Talent.cs') diff --git a/DiscoBot/Auxiliary/Talent.cs b/DiscoBot/Auxiliary/Talent.cs new file mode 100644 index 0000000..969304c --- /dev/null +++ b/DiscoBot/Auxiliary/Talent.cs @@ -0,0 +1,37 @@ +namespace DiscoBot.Auxiliary +{ + using System; + + public class Talent // talent objekt + { + public Talent(string name, string probe, int value) + { + this.Name = name; + this.Probe = probe; + this.Value = value; + } + + public string Name { get; set; } + + public string Probe { get; set; } + + public int Value { get; set; } + + public string[] Test() // turn XX/XX/XX into string[]{XX,XX,XX} + { + var temp = this.Probe.Split('/'); + for (var index = 0; index < temp.Length; index++) + { + temp[index] = temp[index].Replace("/", string.Empty); + } + + return temp; + } + + public int CheckName(string quarry) + { + var sc = (StringComparer)new SpellCorrect(); + return sc.Compare(quarry, this.Name); + } + } +} -- cgit v1.2.3-54-g00ecf