public Battle(IEnumerable<IEnumerable<Character>> teams, IPlugin interopPlugin, IJSScriptHelper scriptHelper, IRandomHelper randomHelper) { if(teams == null) { throw new ArgumentNullException(nameof(teams)); } if(interopPlugin == null) { throw new ArgumentNullException(nameof(interopPlugin)); } if(scriptHelper == null) { throw new ArgumentNullException(nameof(scriptHelper)); } if(randomHelper == null) { throw new ArgumentNullException(nameof(randomHelper)); } this.AllCharactersInTeams = new Dictionary<string, ICollection<SpecificCharacter>>(); foreach (var team in teams) { var teamCharacters = (ICollection<SpecificCharacter>)team.Select(x => new SpecificCharacter(x)); this.AllCharactersInTeams.Add("team", teamCharacters); } this.InteropPlugin = interopPlugin; this.ScriptHelper = scriptHelper; this.RandomHelper = randomHelper; }
public void TestSetup() { container = new UnityContainer(); InteropPlugins.Bootstrapper.BootstrapUnity(container); scriptHelper = container.Resolve<IJSScriptHelper>(); scriptHelper.ScriptDir = "/TestScripts/"; }
public JSPlugin(IJSScriptHelper scriptHelper) { ScriptHelper = scriptHelper; }
public void TestSetup() { container = new UnityContainer(); Common.Bootstrapper.BootstrapUnity(container); InteropPlugins.Bootstrapper.BootstrapUnity(container); scriptHelper = container.Resolve<IJSScriptHelper>(); randomHelper = container.Resolve<IRandomHelper>(); scriptHelper.ScriptDir = "/TestScripts/"; pluginInterop = new JSPlugin(scriptHelper); }