static void DebugAllRead(string path) { DateTime localDate = DateTime.Now; List <TJobject> TJList = new List <TJobject>(); int count = 0; TJ.ReadTJ(path, ref TJList); count = TJList.Count; string debstr = ""; foreach (TJobject TJ in TJList) { debstr = debstr + TJ.date.ToString() + "." + TJ.mks + Environment.NewLine; } for (int i = 0; i < TJList.Count; i++) { if (TJList[i].tjevent == @"ADMIN") { Console.WriteLine("beep"); } } DateTime localDateEnd = DateTime.Now; Console.WriteLine("Count = " + count); Console.WriteLine(localDateEnd - localDate); Console.ReadKey(); }
protected override void OnKilledTarget(Creature target) { base.OnKilledTarget(target); // Death message var nonPlayer = (NonPlayer)target; var message = Strings.GetNpcDeathMessage(target.Name); TJ.GameLog(message); // Experience award Experience += nonPlayer.Info.Experience; message = Strings.GetExpMessage(nonPlayer.Info.Experience); TJ.GameLog(message); // Generate loot var loot = nonPlayer.Info.Loot; if (loot != null && loot.Count > 0) { foreach (var lootEntry in loot) { var success = MathUtils.RollPercentage(lootEntry.Rate); if (success) { var item = new Item(lootEntry.ItemInfo); target.Tile.Inventory.Add(item, 1); } } } target.Remove(); }
/// <summary> /// This API usage is optimized for multiple runs of the same image size, by reusing the byte arrays instead of allocating new ones for every operation. /// </summary> private static void benchTJOptimized() { byte[] data = File.ReadAllBytes(inputFilePath); byte[] recompressed; int recompressedSize = 0; System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); using (TJDecompressor decomp = new TJDecompressor(data)) { // Optimize by pre-allocating the buffers and re-using them. byte[] rawImg = new byte[decomp.getWidth() * decomp.getHeight() * TJ.getPixelSize(PixelFormat.RGB)]; recompressed = new byte[TJ.bufSize(decomp.getWidth(), decomp.getHeight(), decomp.getSubsamp())]; using (TJCompressor comp = new TJCompressor(rawImg, decomp.getWidth(), decomp.getHeight())) { comp.setJPEGQuality(jpegQuality); for (int i = 0; i < numIterations; i++) { decomp.decompress(rawImg); comp.compress(ref recompressed, Flag.NONE); } recompressedSize = comp.getCompressedSize(); } } sw.Stop(); PrintBenchmarkResult("turbojpegCLI optimized", sw.ElapsedMilliseconds); using (FileStream fs = new FileStream("out-libjpeg-turbo-optimized.jpg", FileMode.Create)) { fs.Write(recompressed, 0, recompressedSize); } }
protected override void OnEntered() { base.OnEntered(); if (Map.DungeonLevel == null) { TJ.GameLog(Strings.BuildEnteredMap(Map.Name)); } else { TJ.GameLog(Strings.BuildEnteredMap(Map.Name + ", " + Map.DungeonLevel.Value)); } }
private static void OnTimedEvent(Object source, ElapsedEventArgs e) { int count = 0; //приостанавливаем таймер на время чтения aTimer.Enabled = false; while (TJ.ReadTJ(pathTimer, ref TJList, 1000, ref coord, ref coordFin)) { count = TJList.Count + count; TJList.Clear(); Console.WriteLine(coord.filename); } aTimer.Enabled = true; Console.WriteLine("timer"); Console.WriteLine("Count = " + count); }
protected override void OnPositionChanged() { base.OnPositionChanged(); if (Tile == null || Tile.Inventory.Items.Count == 0) { return; } if (Tile.Inventory.Items.Count == 1) { TJ.GameLog(Strings.BuildItemLyingOnTheFloor(Tile.Inventory.Items[0].Item.Info.Name)); } else { TJ.GameLog(Strings.SomeItemsAreLying); } }
public void UpdateTilesVisibility(bool refreshMap = false) { var map = Player.Map; // Reset IsInFov for the whole map for (var x = 0; x < map.Width; ++x) { for (var y = 0; y < map.Height; ++y) { map[x, y].IsInFov = false; } } map.FieldOfView.Calculate(Player.Position.X, Player.Position.Y, 12); foreach (var coord in map.FieldOfView.CurrentFOV) { var tile = map[coord]; tile.IsInFov = true; if (!tile.IsExplored) { refreshMap = true; tile.IsExplored = true; } if (tile.Creature != null) { var asNpc = tile.Creature as NonPlayer; if (asNpc != null && asNpc.Info.CreatureType == CreatureType.Enemy && asNpc.AttackTarget == null) { TJ.GameLog(Strings.BuildRushesToAttack(asNpc.Info.Name)); asNpc.AttackTarget = TJ.Player; } } } if (refreshMap) { MapNavigationBase.InvalidateImage(); } }
public void UseAbility(AbilityInfo ability) { if (Player.Stats.Life.CurrentMana < ability.Mana) { TJ.GameLog(Strings.NotEnoughEnergy); return; } var success = true; foreach (var effect in ability.Effects) { var asHealSelf = effect as HealSelf; if (asHealSelf != null) { var amount = (float)MathUtils.Random.Next(asHealSelf.Minimum, asHealSelf.Maximum + 1); if (Player.Stats.Life.CurrentHP >= Player.Stats.Life.MaximumHP) { TJ.GameLog(Strings.MaximumHpAlready); success = false; continue; } else if (Player.Stats.Life.CurrentHP + amount > Player.Stats.Life.MaximumHP) { amount = Player.Stats.Life.MaximumHP - Player.Stats.Life.CurrentHP; } Player.Stats.Life.CurrentHP += amount; var message = string.Format(asHealSelf.MessageActivated, amount); TJ.GameLog(message); } } if (success) { Player.Stats.Life.CurrentMana -= ability.Mana; WorldAct(); } }
/// <summary> /// This method is used to configure the strategy and is called once before any strategy method is called. /// </summary> protected override void Initialize() { tj = TJ("4/29/14", true, EntryOffsetTics, StopOffsetTics, Tgt1X, Tgt2X, Tgt3X, MOM1Len, MOM2Len, true); Add(tj); Add(PitColor(Color.Black, 80000, 25, 160000)); Add(EMA(EMA1Len)); Add(EMA(EMA2Len)); Add(DonchianChannel(MOM1Len)); Add(DonchianChannel(MOM2Len)); //Add(DonchianChannel(TrailLen)); //Add(HMARick(55,50)); EMA(EMA1Len).Plots[0].Pen.Color = Color.DarkGray; EMA(EMA2Len).Plots[0].Pen.Color = Color.DarkBlue; DonchianChannel(MOM1Len).AutoScale = false; DonchianChannel(MOM1Len).Plots[0].Pen.DashStyle = DashStyle.Dash; DonchianChannel(MOM1Len).Plots[0].Pen.Color = Color.DarkCyan; // mean DonchianChannel(MOM1Len).Plots[1].Pen.Color = Color.Transparent; // top plot DonchianChannel(MOM1Len).Plots[2].Pen.Color = Color.Transparent; // bottom plot DonchianChannel(MOM1Len).PaintPriceMarkers = false; DonchianChannel(MOM2Len).AutoScale = false; DonchianChannel(MOM2Len).Plots[0].Pen.DashStyle = DashStyle.Dash; DonchianChannel(MOM2Len).Plots[0].Pen.Color = Color.DarkRed; // mean DonchianChannel(MOM2Len).Plots[1].Pen.Color = Color.Transparent; // top plot DonchianChannel(MOM2Len).Plots[2].Pen.Color = Color.Transparent; // bottom plot DonchianChannel(MOM2Len).PaintPriceMarkers = false; ExitOnClose = true; CalculateOnBarClose = true; if (SinceEntry == 0) { Unmanaged = true; } }
public void FillData(Module module, Dictionary <string, T> output) { foreach (var pair in _sourceData) { try { var item = LoadItem(module, pair.Key, pair.Value); item.Id = pair.Key; item.Source = pair.Value.Source; output[item.Id] = item; if (CompilerParams.Verbose) { TJ.LogInfo("Added to {0}, id: '{1}', value: '{2}'", JsonArrayName, item.Id, item.ToString()); } } catch (Exception ex) { throw new Exception("Compilation Error. Message = '" + ex.Message + "', Id = '" + pair.Key + "', Source = '" + pair.Value.Source + "'", ex); } } }
public void Attack(Creature target) { var battleStats = Stats.Battle; var attacks = battleStats.Attacks; if (attacks == null || attacks.Length == 0) { return; } foreach (var attack in attacks) { var armorClass = target.Stats.Battle.ArmorClass; var attackRoll = 50 + battleStats.HitRoll * 8 - armorClass; Debug.WriteLine("{0} against {1}'s attack roll is {2}", Name, target.Name, attackRoll); var damage = MathUtils.Random.Next(attack.MinDamage, attack.MaxDamage + 1); if (!MathUtils.RollPercentage(attackRoll) || damage <= 0) { // Miss var message = Strings.GetMissMessage(Name, target.Name, attack.AttackType); TJ.GameLog(message); } else { target.Stats.Life.CurrentHP -= damage; var message = Strings.GetAttackMessage(damage, Name, target.Name, attack.AttackType); TJ.GameLog(message); if (target.Stats.Life.CurrentHP <= 0 && target != TJ.Player) { OnKilledTarget(target); break; } } } }
static void DebugCountRead(string path) { DateTime localDate = DateTime.Now; List <TJobject> TJList = new List <TJobject>(); int count = 0; TJCoord coord = new TJCoord(); while (TJ.ReadTJ(path, ref TJList, 1000, ref coord)) { count = TJList.Count + count; TJList.Clear(); Console.WriteLine(coord.filename); } count = TJList.Count + count; DateTime localDateEnd = DateTime.Now; Console.WriteLine("Count = " + count); Console.WriteLine(localDateEnd - localDate); Console.ReadKey(); }
protected override void OnItemTaken(Item item, int count) { base.OnItemTaken(item, count); TJ.GameLog(Strings.BuildPickedUp(item.Info.Name, count)); }
private void FirstRun(IEnumerable <string> sources) { if (CompilerParams.Verbose) { TJ.LogInfo("{0} source files found", sources.Count()); } // First run - parse json and build object maps foreach (var s in sources) { if (CompilerParams.Verbose) { TJ.LogInfo("Processing {0}", s); } JObject json; try { json = JObject.Parse(File.ReadAllText(s)); } catch (Exception ex) { throw new Exception(string.Format("JSON parsing error. Source '{0}'. Error '{1}'", s, ex.ToString())); } foreach (var pair in json) { var key = pair.Key; if (key == TileSetName) { if (json.Count > 1) { throw new Exception(string.Format("Tileset file can have only one tileset entry. Source: '{0}'", s)); } var obj = (JObject)pair.Value; JToken idToken; if (!obj.TryGetValue(IdName, out idToken)) { throw new Exception(string.Format("Tileset object lacks id. Source: '{0}'", s)); } var id = idToken.ToString(); _loaders[typeof(TileSet)].SafelyAddObject(id, s, (JObject)pair.Value); continue; } else if (key == MapName) { if (json.Count > 1) { throw new Exception(string.Format("Map file can have only one map entry. Source: '{0}'", s)); } var obj = (JObject)pair.Value; JToken idToken; if (!obj.TryGetValue(IdName, out idToken)) { throw new Exception(string.Format("Map object lacks id. Source: '{0}'", s)); } var id = idToken.ToString(); _loaders[typeof(Map)].SafelyAddObject(id, s, (JObject)pair.Value); continue; } else if (key == ModuleInfoName) { var obj = (JObject)pair.Value; _moduleInfo = new ObjectData { Source = s, Data = obj }; continue; } else if (key == LevelsName) { var arr = (JArray)pair.Value; foreach (JObject levelObject in arr) { var levelCost = new LevelCost( levelObject.EnsureInt("Level"), levelObject.EnsureInt("Experience"), levelObject.EnsureInt("Gold") ); _module.LevelCosts[levelCost.Level] = levelCost; } continue; } BaseLoader loader = null; foreach (var pair2 in _loaders) { if (pair2.Value.JsonArrayName == key) { loader = pair2.Value; break; } } if (loader == null) { throw new Exception(string.Format("Unknown object type '{0}', source: '{1}", key, s)); } var properties = new Dictionary <string, string>(); JToken token; if (((JObject)pair.Value).TryGetValue(PropertiesName, out token)) { foreach (var pair2 in (JObject)token) { properties[pair2.Key] = pair2.Value.ToString(); } } foreach (var pair2 in (JObject)pair.Value) { if (pair2.Key == PropertiesName) { continue; } loader.SafelyAddObject(pair2.Key, s, (JObject)pair2.Value, properties); } } } }
private bool ProcessMovementCreature(Point newPos) { var player = TJ.Player; var asNpc = player.Map[newPos].Creature as NonPlayer; if (asNpc == null) { return(false); } var handled = true; switch (asNpc.Info.CreatureType) { case CreatureType.Merchant: // Initiate trade var dialog = new TradeDialog(player, asNpc); dialog.ShowModal(Desktop); break; case CreatureType.Instructor: Dialog messageBox; if (player.Level < TJ.Module.MaximumLevel) { var nextLevel = TJ.Module.LevelCosts[player.Level + 1]; if (nextLevel.Experience <= player.Experience && nextLevel.Gold <= player.Gold) { var str = Strings.BuildNextLevelOffer(player.Experience, player.Gold, nextLevel.Experience, nextLevel.Gold); messageBox = Dialog.CreateMessageBox(Strings.InstructorCaption, str); messageBox.Closed += (s, a) => { if (!messageBox.Result) { return; } // Level up player.Experience -= nextLevel.Experience; player.Gold -= nextLevel.Gold; player.Level++; TJ.GameLog(Strings.BuildNextLevel(player.Level, player.ClassPointsLeft)); }; } else { var str = Strings.BuildNextLevelRequirements(player.Experience, player.Gold, nextLevel.Experience, nextLevel.Gold); messageBox = Dialog.CreateMessageBox(Strings.InstructorCaption, str); messageBox.ButtonCancel.Visible = false; } } else { messageBox = Dialog.CreateMessageBox(Strings.InstructorCaption, Strings.ReachedMaximumLevel); messageBox.ButtonCancel.Visible = false; } messageBox.DragDirection = DragDirection.None; messageBox.ShowModal(Desktop); break; default: handled = false; break; } return(handled); }
public static void DoThing() { try { //Console.WriteLine("DoThing"); int pos = 0; bool isTop = false; bool iscomplete = false; int lastSeq = 0; int lastSub = 0; bool loop = true; while (loop) { int length = udpClient.Client.ReceiveFrom(data, ref udpEP); if (data[3] == 0x00) { lastSeq = data[0]; lastSub = -1; pos = 0; } if (data[0] == lastSeq && lastSub + 1 == data[3]) { lastSub = data[3]; if (data[1] == 0x01 || data[1] == 0x11) { isTop = true; } else if (isTop) { isTop = false; //LIES! } //Need to valid that the entire UDP stream is received before proceeding... Otherwise TDJ crashes. //Console.WriteLine("{0:x2} {1:x2} {2:x2} {3:x2}", data[0], data[1], data[2], data[3]); if (pos + length > jpegImage.Length) { loop = false; pos = 0; } else { Array.Copy(data, 4, jpegImage, pos, length - 4); pos += length - 4; if (data[1] >= 0x10) { iscomplete = true; loop = false; //Console.WriteLine("S"); } } } else { loop = false; pos = 0; //Console.WriteLine("FB"); } } if (iscomplete) { byte[] decom; tjd = new TJDecompressor(jpegImage); if (isTop) { decom = new byte[240 * 400 * TJ.getPixelSize(turbojpegCLI.PixelFormat.RGB)]; tjd.decompress(decom, turbojpegCLI.PixelFormat.RGB, Flag.NONE); if (FormMain.viewerTop != null) { FormMain.viewerTop.LoadTexture(400, 240, decom); } } else { decom = new byte[240 * 320 * TJ.getPixelSize(turbojpegCLI.PixelFormat.RGB)]; tjd.decompress(decom, turbojpegCLI.PixelFormat.RGB, Flag.NONE); if (FormMain.viewerTop != null) { FormMain.viewerBottom.LoadTexture(320, 240, decom); } } tjd.Dispose(); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
public DummyDataContext() { Europa = new Continent(); Europa.ContinentID = 1; Europa.Name = "Europa"; Graad = new Grade(1); Belgium = new Country("Belgie",Europa); England = new Country("England",Europa); Belgium.CountryID = 1; England.CountryID = 2; //Belgium.AboveEquator = true; //England.AboveEquator = false; //voor te testen. England ligt obviously boven de Equator int[] temp = new int[]{1,5,3,4,5,6,7,8,9,10,40,12}; int[] sed = new int[] {10, 206, 30, 200, 50, 60, 70, 80, 20, 100, 110, 120}; int[] temp2 = new int[] { 1, 2, 3, 0, -10, -12, 7, 8, 9, 10, 11, 12 }; int[] sed2 = new int[] { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120 }; NegTempClimateChart = new ClimateChart("Chelsea",2000,2030,temp2,sed2, -20, 10); NegTempClimateChart.Country = England; NegTempClimateChart.ClimateChartID = 2; England.ClimateCharts = new List<ClimateChart>{NegTempClimateChart}; Gent = new ClimateChart("gent",1950,1960,temp,sed, 55, 6); Gent.Country = Belgium; Gent.ClimateChartID = 1; ClimateCharts = new List<ClimateChart>{ Gent }; Belgium.ClimateCharts = ClimateCharts; Countries = new List<Country>{ Belgium,England }; Europa.Countries = Countries; Continenten = new List<Continent>{ Europa }; Graad.Continents = Continenten; Parameter tw = new TW("Wat is de temperatuur van de warmste maand (TW)?"); Parameter mw = new MW("Wat is de warmste maand?"); Parameter mk = new MK("Wat is de temperatuur van de koudste maand?"); Parameter tk = new TK("Wat is de temperatuur van de koudste maand (TK)?"); Parameter d = new D("Hoeveel droge maanden zijn er?"); Parameter nz = new NZ("Hoeveelheid neerslag in de zomer?"); Parameter nw = new NW("Hoeveelheid neerslag in de winter?"); Parameter tj = new TJ(""); Parameter nj = new NJ(""); Parameter tm = new TM(""); //ClauseComponent tw10 = new Clause("TW <= 10", tw, "<=", 10); //ClauseComponent CC2 = new Clause("TW <= 10", tw, "<", 10); //ClauseComponent CC3 = new Clause("TW <= 10", tw, ">=", 10); //ClauseComponent CC4 = new Clause("TW <= 10", tw, ">", 10); //ClauseComponent res1 = new Result("YES", "geen woestijn"); //ClauseComponent res2 = new Result("NO", "woestijn"); //tw10.ClauseComponentId = 1; //res1.ClauseComponentId = 2; //res2.ClauseComponentId = 3; //tw10.Add(true, res1); //tw10.Add(false, res2); //CC2.Add(true, res1); //CC2.Add(false, res2); //CC3.Add(true, res1); //CC3.Add(false, res2); //CC4.Add(true, res1); //CC4.Add(false, res2); //DetTable = new DeterminateTable(); //DetTable2 = new DeterminateTable(); //DetTable3 = new DeterminateTable(); //DetTable4 = new DeterminateTable(); Graad.DeterminateTableProp = DetTable; Country belgië = new Country { Name = "België" }; temps = new int[] { 10, 12, 12, 14, 15, 20, 28, 32, 28, 16, 6, 2 }; sed = new[] { 120, 145, 200, 120, 150, 100, 140, 40, 100, 120, 130, 100 }; chart = new ClimateChart("Gent", 1990, 1991, temps, sed, 55, 6); chart.Country = belgië; temps2 = new int[] { 14, 15, 17, 21, 25, 27, 28, 27, 26, 23, 19, 15 }; sed2 = new[] { 7, 4, 4, 2, 0, 0, 0, 0, 0, 1, 3, 5 }; chart2 = new ClimateChart("Kaïro", 1961, 1990, temps2, sed2, -20, 2); Country egypte = new Country { Name = "Egypte" }; //egypte.AboveEquator = false; chart2.Country = egypte; temps3 = new int[] { 0, 1, 5, 11, 17, 22, 25, 24, 20, 14, 9, 3 }; sed3 = new[] { 77, 73, 91, 96, 97, 91, 103, 95, 86, 77, 97, 86 }; chart3 = new ClimateChart("New York", 1961, 1990, temps3, sed3, 50, -50); Country newyork = new Country { Name = "New York" }; chart3.Country = newyork; temps4 = new int[] { 25, 1, 5, 11, 17, 22, 25, 24, 20, 14, 9, 3 }; sed4 = new[] { 1, 2, 0, 0, 0, 100, 100, 100, 100, 100, 0, 0 }; chart4 = new ClimateChart("Fictief", 1961, 1990, temps4, sed4, 60, 20); Country fictief = new Country { Name = "Fictief" }; chart4.Country = fictief; byte[] picture = null; ClauseComponent tw10 = new Clause("TW <= 10", tw, "<=", 10); ClauseComponent tw0 = new Clause("TW <= 0", tw, "<=", 0); ClauseComponent tw0Yes = new Result("Koud klimaat zonder dooiseizoen", "Ijswoestijnklimaat", picture); ClauseComponent tw0No = new Result("Koud klimaat met dooiseizoen", "Toendraklimaat", picture); tw0.Add(true, tw0Yes); tw0.Add(false, tw0No); tw10.Add(true, tw0); ClauseComponent tj0 = new Clause("TJ <= 0", tj, "<=", 0); tw10.Add(false, tj0); ClauseComponent tj0Yes = new Result("Koudgematigd klimaat met strenge winter", "Taigaklimaat", picture); tj0.Add(true, tj0Yes); ClauseComponent nj200 = new Clause("NJ <= 200", nj, "<=", 200); ClauseComponent tk15 = new Clause("TK <= 15", tk, "<=", 15); ClauseComponent tk15Yes = new Result("Gematigd altijd droog klimaat", "Woestijnklimaat van de middelbreedten", picture); ClauseComponent tk15No = new Result("Warm altijd droog klimaat", "Woestijnklimaat van de tropen", picture); tk15.Add(true, tk15Yes); tk15.Add(false, tk15Yes); nj200.Add(true, tk15); tj0.Add(false, nj200); ClauseComponent tk18 = new Clause("TK <= 18", tk, "<=", 18); ClauseComponent nj400 = new Clause("NJ <= 400", nj, "<=", 400); ClauseComponent nj400Yes = new Result("Gematigd, droog klimaat", "Steppeklimaat", picture); ClauseComponent tk10N = new Clause("TK <= -10", tk, "<=", -10); ClauseComponent tk10NYes = new Result("Koudgematigd klimaat met strenge winter", "Taigaklimaat", picture); ClauseComponent d1 = new Clause(" D <= 1", d, "<=", 1); ClauseComponent tk3N = new Clause("TK <= -3", tk, "<=", -3); ClauseComponent tk3NYes = new Result("Koelgematigd klimaat met koude winter", "Gemengd-woudklimaat", picture); ClauseComponent tw22 = new Clause(" TW <= 22", tw, "<=", 22); ClauseComponent tw22Yes = new Result("Koelgematigd klimaat met zachte winter", "Loofbosklimaat", picture); ClauseComponent tw22No = new Result("Warmgematigd altijd nat klimaat", "Subtropisch regenwoudklimaat", picture); ClauseComponent nznw = new Clause("NZ <= NW", nz, nw); ClauseComponent tw222 = new Clause("TW <= 22", tw, "<=", 22); ClauseComponent tw222Yes = new Result("Koelgematigd klimaat met natte winter", "Hardbladige-vegetatieklimaat van de centrale middelbreedten", picture); ClauseComponent tw222No = new Result("Warmgematigd klimaat met natte winter", "Hardbladige-vegetatieklimaat van de subtropen", picture); ClauseComponent nznwNo = new Result("Warmgematigd klimaat met natte zomer", "Subtropisch savanneklimaat", picture); tw222.Add(true, tw222Yes); tw222.Add(false, tw222No); nznw.Add(true, tw222); nznw.Add(false, nznwNo); tw22.Add(true, tw22Yes); tw22.Add(false, tw22No); tk3N.Add(true, tk3NYes); tk3N.Add(false, tw22); d1.Add(true, tk3N); d1.Add(false, nznw); tk10N.Add(true, tk10NYes); tk10N.Add(false, d1); nj400.Add(true, nj400Yes); nj400.Add(false, tk10N); tk18.Add(true, nj400); nj200.Add(false, tk18); ClauseComponent d12 = new Clause("D <= 1", d, "<=", 1); ClauseComponent d12Yes = new Result("Warm klimaat met nat seizoen", "Tropisch savanneklimaat", picture); ClauseComponent d12No = new Result("Warm altijd nat klimaat", "Tropisch regenwoudklimaat", picture); d12.Add(true, d12Yes); d12.Add(false, d12No); tk18.Add(false, d12); dTable = new DeterminateTable(); List<ClauseComponent> results1 = (new ClauseComponent[] { tw0, tj0,nj200, tk15,tk18, nj400, tk10N, d1, tk3N, tw22, nznw, tw222, d12, tw0Yes, tw0No, tj0Yes, tk15Yes, tk15No, nj400Yes, tk10NYes, tk3NYes, tw22Yes, tw22No, tw222Yes, tw222No, nznwNo, d12Yes, d12No, tw10 }).ToList(); results1.ForEach(r => dTable.AllClauseComponents.Add(r)); }