private void CreateCommand(Match match) { //<name>.create(<health>, <damage>, <war effect>, <attack>) //Cenko.create(30, 15, Kamikaze, Paris) var name = match.Groups[1].Value; var health = int.Parse(match.Groups[3].Value); var damage = int.Parse(match.Groups[4].Value); var wareffect = match.Groups[5].Value; var attack = match.Groups[6].Value; var WarEffect = warEffectFactory.CreateWarEffect(wareffect); var Attack = attackFactory.CreateWarEffect(attack); //string name, int health, int damage, WarEffects warEffect, AttackTypes groupAttackType var Group = new HackGroup(name, health, damage, WarEffect, Attack); data.AddGroup(Group); }