summaryrefslogtreecommitdiff
path: root/DiscoBot/Auxiliary/Talent.cs
blob: 969304c387e6c20ced264b10c4563edde73d3725 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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);
        }
    }
}