From 560f454c9beb2f691730b126fc6b3e23d68d6681 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Sun, 30 Sep 2018 02:06:02 +0200 Subject: added mot of the database infrastructure --- DSACore/Models/Database/GeneralSpell.cs | 11 ++++++++++- DSACore/Models/Database/Roll.cs | 12 ------------ DSACore/Models/Database/Talent.cs | 8 +++++++- 3 files changed, 17 insertions(+), 14 deletions(-) delete mode 100644 DSACore/Models/Database/Roll.cs (limited to 'DSACore/Models/Database') diff --git a/DSACore/Models/Database/GeneralSpell.cs b/DSACore/Models/Database/GeneralSpell.cs index 807a09b..6a6e94c 100644 --- a/DSACore/Models/Database/GeneralSpell.cs +++ b/DSACore/Models/Database/GeneralSpell.cs @@ -7,6 +7,15 @@ namespace DSACore.Models.Database { public class GeneralSpell : Talent { - public string Comlexity = "A"; + public char Comlexity = 'A'; + + public GeneralSpell(string name, string roll, char comlexity = 'A') :base(name, roll) + { + Comlexity = comlexity; + } + + public GeneralSpell(string name, string roll) : base(name, roll) + { + } } } diff --git a/DSACore/Models/Database/Roll.cs b/DSACore/Models/Database/Roll.cs deleted file mode 100644 index 547fde4..0000000 --- a/DSACore/Models/Database/Roll.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace DSACore.Models.Database -{ - public class Roll - { - public string[] Skills { get; set; } = new string[3]; - } -} diff --git a/DSACore/Models/Database/Talent.cs b/DSACore/Models/Database/Talent.cs index 6bd8cba..117d0f7 100644 --- a/DSACore/Models/Database/Talent.cs +++ b/DSACore/Models/Database/Talent.cs @@ -7,8 +7,14 @@ namespace DSACore.Models.Database { public class Talent { + public Talent(string name, String roll) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Roll = roll.Split('/'); + } + public string Name { get; set; } - public Roll Roll { get; set; } = new Roll(); + public string[] Roll { get; set; } = new string[3]; } } -- cgit v1.3.1