commit b82e014bd4a7e8dd640af6801de7de44a5845b3f Author: Sebastian Seedorf Date: Sun Feb 16 16:40:20 2020 +0100 Initial commit diff --git a/AntMe.Player.FirstOne.dll b/AntMe.Player.FirstOne.dll new file mode 100644 index 0000000..0416623 Binary files /dev/null and b/AntMe.Player.FirstOne.dll differ diff --git a/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/contentModel.xml b/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/contentModel.xml new file mode 100644 index 0000000..02cf7ea --- /dev/null +++ b/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/contentModel.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/modules.xml b/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/modules.xml new file mode 100644 index 0000000..8985e74 --- /dev/null +++ b/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/workspace.xml b/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/workspace.xml new file mode 100644 index 0000000..f45e616 --- /dev/null +++ b/BrainArmyAnts/.idea/.idea.BrainArmyAnts/.idea/workspace.xml @@ -0,0 +1,928 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + braucht + brauchtnoch + remove + sprühe + O + gra + gest + istge + grei + feind + bestimme + tick + sieht + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + + + + + + + + + + + + + + project + + + true + + + + DIRECTORY + + false + + + + + + + + + + + + + + 1507277883927 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BrainArmyAnts/.idea/.idea.BrainArmyAnts/riderModule.iml b/BrainArmyAnts/.idea/.idea.BrainArmyAnts/riderModule.iml new file mode 100644 index 0000000..6f60b27 --- /dev/null +++ b/BrainArmyAnts/.idea/.idea.BrainArmyAnts/riderModule.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/BrainArmyAnts/BrainArmyAnts.csproj b/BrainArmyAnts/BrainArmyAnts.csproj new file mode 100644 index 0000000..281eb0a --- /dev/null +++ b/BrainArmyAnts/BrainArmyAnts.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {c9150cc8-d3d1-4c58-88d4-21467cc3e5cd} + Library + Properties + AntMe.Player.BrainArmyAnts + AntMe.Player.BrainArmyAnts + v4.0 + 512 + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + x86 + + + + C:\Program Files (x86)\AntMe 1.7\AntMe.SharedComponents.dll + True + + + C:\Program Files (x86)\AntMe 1.7\AntMe.Simulation.dll + True + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BrainArmyAnts/BrainArmyAnts.csproj.user b/BrainArmyAnts/BrainArmyAnts.csproj.user new file mode 100644 index 0000000..fc4af83 --- /dev/null +++ b/BrainArmyAnts/BrainArmyAnts.csproj.user @@ -0,0 +1,13 @@ + + + + Program + C:\Program Files (x86)\AntMe 1.7\AntMe.exe + /file="D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\AntMe.Player.BrainArmyAnts.dll" + + + Program + C:\Program Files (x86)\AntMe 1.7\AntMe.exe + /file="D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\AntMe.Player.BrainArmyAnts.dll" + + \ No newline at end of file diff --git a/BrainArmyAnts/BrainArmyAnts.sln b/BrainArmyAnts/BrainArmyAnts.sln new file mode 100644 index 0000000..f429457 --- /dev/null +++ b/BrainArmyAnts/BrainArmyAnts.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{5073ec23-8de2-41a9-8111-f403901fa274}") = "BrainArmyAnts", "BrainArmyAnts.csproj", "{c9150cc8-d3d1-4c58-88d4-21467cc3e5cd}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {c9150cc8-d3d1-4c58-88d4-21467cc3e5cd}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {c9150cc8-d3d1-4c58-88d4-21467cc3e5cd}.Debug|Any CPU.Build.0 = Debug|Any CPU + {c9150cc8-d3d1-4c58-88d4-21467cc3e5cd}.Release|Any CPU.ActiveCfg = Release|Any CPU + {c9150cc8-d3d1-4c58-88d4-21467cc3e5cd}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/BrainArmyAnts/BrainArmyAntsKlasse - Copy.txt b/BrainArmyAnts/BrainArmyAntsKlasse - Copy.txt new file mode 100644 index 0000000..e47f827 --- /dev/null +++ b/BrainArmyAnts/BrainArmyAntsKlasse - Copy.txt @@ -0,0 +1,499 @@ +using AntMe.Deutsch; +using System; +using System.CodeDom; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; + +namespace AntMe.Player.BrainArmyAnts +{ + /// + /// Diese Datei enthält die Beschreibung für deine Ameise. Die einzelnen Code-Blöcke + /// (Beginnend mit "public override void") fassen zusammen, wie deine Ameise in den + /// entsprechenden Situationen reagieren soll. Welche Befehle du hier verwenden kannst, + /// findest du auf der Befehlsübersicht im Wiki (http://wiki.antme.net/de/API1:Befehlsliste). + /// + /// Wenn du etwas Unterstützung bei der Erstellung einer Ameise brauchst, findest du + /// in den AntMe!-Lektionen ein paar Schritt-für-Schritt Anleitungen. + /// (http://wiki.antme.net/de/Lektionen) + /// + [Spieler( + Volkname = "BrainArmyAnts", // Hier kannst du den Namen des Volkes festlegen + Vorname = "Sebastian", // An dieser Stelle kannst du dich als Schöpfer der Ameise eintragen + Nachname = "Seedorf" // An dieser Stelle kannst du dich als Schöpfer der Ameise eintragen + )] + + /// Kasten stellen "Berufsgruppen" innerhalb deines Ameisenvolkes dar. Du kannst hier mit + /// den Fähigkeiten einzelner Ameisen arbeiten. Wie genau das funktioniert kannst du der + /// Lektion zur Spezialisierung von Ameisen entnehmen (http://wiki.antme.net/de/Lektion7). + [Kaste( + Name = "Sammler", // Name der Berufsgruppe + AngriffModifikator = -1, // Angriffsstärke einer Ameise + DrehgeschwindigkeitModifikator = -1, // Drehgeschwindigkeit einer Ameise + EnergieModifikator = -1, // Lebensenergie einer Ameise + GeschwindigkeitModifikator = 2, // Laufgeschwindigkeit einer Ameise + LastModifikator = 2, // Tragkraft einer Ameise + ReichweiteModifikator = -1, // Ausdauer einer Ameise + SichtweiteModifikator = 0 // Sichtweite einer Ameise + ), + Kaste( + Name = "Erkunder", // Name der Berufsgruppe + AngriffModifikator = -1, // Angriffsstärke einer Ameise + DrehgeschwindigkeitModifikator = -1, // Drehgeschwindigkeit einer Ameise + EnergieModifikator = -1, // Lebensenergie einer Ameise + GeschwindigkeitModifikator = 1, // Laufgeschwindigkeit einer Ameise + LastModifikator = -1, // Tragkraft einer Ameise + ReichweiteModifikator = 1, // Ausdauer einer Ameise + SichtweiteModifikator = 2 // Sichtweite einer Ameise + ), + Kaste( + Name = "Krieger", // Name der Berufsgruppe + AngriffModifikator = 2, // Angriffsstärke einer Ameise + DrehgeschwindigkeitModifikator = 1, // Drehgeschwindigkeit einer Ameise + EnergieModifikator = 1, // Lebensenergie einer Ameise + GeschwindigkeitModifikator = -1, // Laufgeschwindigkeit einer Ameise + LastModifikator = -1, // Tragkraft einer Ameise + ReichweiteModifikator = -1, // Ausdauer einer Ameise + SichtweiteModifikator = -1 // Sichtweite einer Ameise + )] + + public class BrainArmyAntsKlasse : Basisameise + { + private static Bau bau = null; + private static readonly Random rand = new Random(); + private static readonly List VorkZuckers = new List(); + private static readonly List RemovedZuckers = new List(); + private static readonly List VorkObsts = new List(); + + private Spielobjekt _z; + + #region Kasten + + /// + /// Jedes mal, wenn eine neue Ameise geboren wird, muss ihre Berufsgruppe + /// bestimmt werden. Das kannst du mit Hilfe dieses Rückgabewertes dieser + /// Methode steuern. + /// Weitere Infos unter http://wiki.antme.net/de/API1:BestimmeKaste + /// + /// Anzahl Ameisen pro Kaste + /// Name der Kaste zu der die geborene Ameise gehören soll + public override string BestimmeKaste(Dictionary anzahl) + { + int count = 0; + foreach(KeyValuePair entry in anzahl) + { + count += entry.Value; + } + if (anzahl["Sammler"] > anzahl["Erkunder"] * 12) + return "Erkunder"; + + + // Gibt den Namen der betroffenen Kaste zurück. + return "Sammler"; + } + + #endregion + + #region Fortbewegung + + /// + /// Wenn die Ameise keinerlei Aufträge hat, wartet sie auf neue Aufgaben. Um dir das + /// mitzuteilen, wird diese Methode hier aufgerufen. + /// Weitere Infos unter http://wiki.antme.net/de/API1:Wartet + /// + public override void Wartet() + { + //GeheGeradeaus(); + //SprüheMarkierung(5, 100); + } + + /// + /// Erreicht eine Ameise ein drittel ihrer Laufreichweite, wird diese Methode aufgerufen. + /// Weitere Infos unter http://wiki.antme.net/de/API1:WirdM%C3%BCde + /// + public override void WirdMüde() + { + //GeheZuBau(); + } + + /// + /// Wenn eine Ameise stirbt, wird diese Methode aufgerufen. Man erfährt dadurch, wie + /// die Ameise gestorben ist. Die Ameise kann zu diesem Zeitpunkt aber keinerlei Aktion + /// mehr ausführen. + /// Weitere Infos unter http://wiki.antme.net/de/API1:IstGestorben + /// + /// Art des Todes + public override void IstGestorben(Todesart todesart) + { + foreach (ObstTraeger obstTraeger in VorkObsts) + { + obstTraeger.AmeiseEntfernen(this); + } + } + + /// + /// Diese Methode wird in jeder Simulationsrunde aufgerufen - ungeachtet von zusätzlichen + /// Bedingungen. Dies eignet sich für Aktionen, die unter Bedingungen ausgeführt werden + /// sollen, die von den anderen Methoden nicht behandelt werden. + /// Weitere Infos unter http://wiki.antme.net/de/API1:Tick + /// + public override void Tick() + { + if (IstMüde) + { + SchrittBau(); + return; + } + + + + if (Kaste == "Sammler") + { + if (GetragenesObst != null && AnzahlAmeisenDerSelbenKasteInSichtweite < 10) + SprüheMarkierung(2, 250); + + + if (AktuelleLast > 0) + { + SprüheMarkierung(5, 30); + SchrittBau(); + } + else + { + _z = BestimmeZiel(); + if (_z == null) + { + GeheGeradeaus(10); + if (rand.Next(50) == 0) + DreheUmWinkel(60); + } + else + { + SchrittZiel(_z); + } + } + } + else + { + GeheGeradeaus(); + SprüheMarkierung(4, 30); + } + + + } + + #endregion + + #region Nahrung + + /// + /// Sobald eine Ameise innerhalb ihres Sichtradius einen Apfel erspäht wird + /// diese Methode aufgerufen. Als Parameter kommt das betroffene Stück Obst. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:Sieht(Obst)" + /// + /// Das gesichtete Stück Obst + public override void Sieht(Obst obst) + { + /*if (Ziel == null && BrauchtNochTräger(obst)) + SchrittZiel(obst);*/ + ObstHinzufügen(obst); + } + + /// + /// Sobald eine Ameise innerhalb ihres Sichtradius einen Zuckerhügel erspäht wird + /// diese Methode aufgerufen. Als Parameter kommt der betroffene Zuckerghügel. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:Sieht(Zucker)" + /// + /// Der gesichtete Zuckerhügel + public override void Sieht(Zucker zucker) + { + ZuckerHinzufügen(zucker); + ZuckerEntfernen(); ///////////////////////////////////////////////////// + } + + /// + /// Hat die Ameise ein Stück Obst als Ziel festgelegt, wird diese Methode aufgerufen, + /// sobald die Ameise ihr Ziel erreicht hat. Ab jetzt ist die Ameise nahe genug um mit + /// dem Ziel zu interagieren. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:ZielErreicht(Obst)" + /// + /// Das erreichte Stück Obst + public override void ZielErreicht(Obst obst) + { + if (Kaste == "Sammler") + { + Nimm(obst); + } + } + + /// + /// Hat die Ameise eine Zuckerhügel als Ziel festgelegt, wird diese Methode aufgerufen, + /// sobald die Ameise ihr Ziel erreicht hat. Ab jetzt ist die Ameise nahe genug um mit + /// dem Ziel zu interagieren. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:ZielErreicht(Zucker)" + /// + /// Der erreichte Zuckerhügel + public override void ZielErreicht(Zucker zucker) + { + if (Kaste == "Sammler") + { + Nimm(zucker); + ZuckerEntfernen(); + } + } + + #endregion + + #region Kommunikation + + /// + /// Markierungen, die von anderen Ameisen platziert werden, können von befreundeten Ameisen + /// gewittert werden. Diese Methode wird aufgerufen, wenn eine Ameise zum ersten Mal eine + /// befreundete Markierung riecht. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:RiechtFreund(Markierung)" + /// + /// Die gerochene Markierung + public override void RiechtFreund(Markierung markierung) + { + /*if ((markierung.Information & 255) == 2 && Ziel == null) // Apfel + SchrittZiel(markierung);*/ + } + + /// + /// So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + /// andere Spielelemente. Entdeckt die Ameise eine Ameise aus dem eigenen Volk, so + /// wird diese Methode aufgerufen. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:SiehtFreund(Ameise)" + /// + /// Erspähte befreundete Ameise + public override void SiehtFreund(Ameise ameise) + { + + } + + /// + /// So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + /// andere Spielelemente. Entdeckt die Ameise eine Ameise aus einem befreundeten Volk + /// (Völker im selben Team), so wird diese Methode aufgerufen. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:SiehtVerb%C3%BCndeten(Ameise)" + /// + /// Erspähte verbündete Ameise + public override void SiehtVerbündeten(Ameise ameise) + { + } + + #endregion + + #region Kampf + + /// + /// So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + /// andere Spielelemente. Entdeckt die Ameise eine Ameise aus einem feindlichen Volk, + /// so wird diese Methode aufgerufen. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:SiehtFeind(Ameise)" + /// + /// Erspähte feindliche Ameise + public override void SiehtFeind(Ameise ameise) + { + } + + /// + /// So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + /// andere Spielelemente. Entdeckt die Ameise eine Wanze, so wird diese Methode aufgerufen. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:SiehtFeind(Wanze)" + /// + /// Erspähte Wanze + public override void SiehtFeind(Wanze wanze) + { + } + + /// + /// Es kann vorkommen, dass feindliche Lebewesen eine Ameise aktiv angreifen. Sollte + /// eine feindliche Ameise angreifen, wird diese Methode hier aufgerufen und die + /// Ameise kann entscheiden, wie sie darauf reagieren möchte. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:WirdAngegriffen(Ameise)" + /// + /// Angreifende Ameise + public override void WirdAngegriffen(Ameise ameise) + { + } + + /// + /// Es kann vorkommen, dass feindliche Lebewesen eine Ameise aktiv angreifen. Sollte + /// eine Wanze angreifen, wird diese Methode hier aufgerufen und die Ameise kann + /// entscheiden, wie sie darauf reagieren möchte. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:WirdAngegriffen(Wanze)" + /// + /// Angreifende Wanze + public override void WirdAngegriffen(Wanze wanze) + { + } + + + #endregion + + #region Eigene + + private Spielobjekt BestimmeZiel() + { + ZuckerEntfernen(); + ObstEntfernen(); + var entfernung = int.MaxValue; + + + Spielobjekt s = null; + foreach (ObstTraeger obstTraeger in VorkObsts) + { + if (obstTraeger.IstTraeger(this)) return obstTraeger.Obst; + } + foreach (var obst in VorkObsts) + { + var neu = Koordinate.BestimmeEntfernung(this, obst.Obst); + if (s != null && neu >= entfernung || neu >= Reichweite / 3 || !obst.BrauchtNochTraeger()) continue; //Ich verstehe das "z != null &&" nicht + s = obst.Obst; + entfernung = neu; + } + + foreach (var zucker in VorkZuckers) + { + var neu = Koordinate.BestimmeEntfernung(this, zucker); + if (s != null && neu >= entfernung || neu >= Reichweite / 3) continue; //Ich verstehe das "z != null &&" nicht + s = zucker; + entfernung = neu; + } + + if (s is Obst) + { + VorkObsts.Find(o => o.Obst == s).AmeiseHinzufügen(this); + } + return s; + + } + + private void SchrittZiel(Spielobjekt ziel) + { + var dist = Koordinate.BestimmeEntfernung(this, ziel); + var angle = Koordinate.BestimmeRichtung(this, ziel); + if (Math.Abs(angle-Richtung) > 10) + DreheInRichtung(angle); + DreheZuZiel(ziel); + if (dist > 2) + GeheGeradeaus(dist/3*2); + else + GeheZuZiel(ziel); + } + + private void SchrittBau() + { + if (bau == null) + { + GeheZuBau(); + bau = (Bau) Ziel; + BleibStehen(); + } + var dist = Koordinate.BestimmeEntfernung(this, bau); + var angle = Koordinate.BestimmeRichtung(this, bau); + if (Math.Abs(angle-Richtung) > 10) + DreheInRichtung(angle); + if (dist > 4) + GeheGeradeaus(dist-2); + else + GeheZuZiel(bau); + } + + private static void ZuckerHinzufügen(Zucker zucker) + { + if (zucker.Menge > 100 && !VorkZuckers.Contains(zucker) && RemovedZuckers.All(z => z != zucker.Id)) + { + VorkZuckers.Add(zucker); + } + } + + private static void ObstHinzufügen(Obst obst) + { + if (VorkObsts.All(o => o.Obst != obst)) + { + VorkObsts.Add(new ObstTraeger(obst)); + } + } + + private static void ZuckerEntfernen()//Zucker zucker + { + for (int i = 0; i < VorkZuckers.Count; ) + { + var zucker = VorkZuckers[i]; + if (zucker.Menge > 0) + { + i++; + } + else + { + if (VorkZuckers.Contains(zucker)) + { + VorkZuckers.Remove(zucker); + } + if (!RemovedZuckers.Contains(zucker.Id)) + { + RemovedZuckers.Add(zucker.Id); + } + } + } + } + + private static void ObstEntfernen() + { + for (int i = 0; i < VorkObsts.Count; ) + { + var obst = VorkObsts[i]; + if (obst.Obst.Menge > 0) + { + i++; + } + else + { + VorkObsts.Remove(obst); + } + } + } + + + #endregion + + } + + public class ObstTraeger + { + public Obst Obst; + private readonly List ameisen; + + public ObstTraeger(Obst obst) + { + Obst = obst; + ameisen = new List(); + } + + public bool BrauchtNochTraeger() + { + return ameisen.Count < 10; + } + + public void AmeiseHinzufügen(BrainArmyAntsKlasse ameise) + { + ameisen.Add(ameise); + } + + public void AmeiseEntfernen(BrainArmyAntsKlasse ameise) + { + ameisen.Remove(ameise); + } + + public bool IstTraeger(BrainArmyAntsKlasse ameise) + { + return ameisen.Contains(ameise); + } + + } + + +} diff --git a/BrainArmyAnts/BrainArmyAntsKlasse.cs b/BrainArmyAnts/BrainArmyAntsKlasse.cs new file mode 100644 index 0000000..43c6985 --- /dev/null +++ b/BrainArmyAnts/BrainArmyAntsKlasse.cs @@ -0,0 +1,573 @@ +using AntMe.Deutsch; +using System; +using System.CodeDom; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using AntMe.Simulation; + +namespace AntMe.Player.BrainArmyAnts +{ + /// + /// Diese Datei enthält die Beschreibung für deine Ameise. Die einzelnen Code-Blöcke + /// (Beginnend mit "public override void") fassen zusammen, wie deine Ameise in den + /// entsprechenden Situationen reagieren soll. Welche Befehle du hier verwenden kannst, + /// findest du auf der Befehlsübersicht im Wiki (http://wiki.antme.net/de/API1:Befehlsliste). + /// + /// Wenn du etwas Unterstützung bei der Erstellung einer Ameise brauchst, findest du + /// in den AntMe!-Lektionen ein paar Schritt-für-Schritt Anleitungen. + /// (http://wiki.antme.net/de/Lektionen) + /// + [Spieler( + Volkname = "BrainArmyAnts", // Hier kannst du den Namen des Volkes festlegen + Vorname = "Joshua Priebsch,", // An dieser Stelle kannst du dich als Schöpfer der Ameise eintragen + Nachname = "Sebastian Seedorf" // An dieser Stelle kannst du dich als Schöpfer der Ameise eintragen + )] + + /// Kasten stellen "Berufsgruppen" innerhalb deines Ameisenvolkes dar. Du kannst hier mit + /// den Fähigkeiten einzelner Ameisen arbeiten. Wie genau das funktioniert kannst du der + /// Lektion zur Spezialisierung von Ameisen entnehmen (http://wiki.antme.net/de/Lektion7). + [Kaste( + Name = "Sammler", // Name der Berufsgruppe + AngriffModifikator = -1, // Angriffsstärke einer Ameise + DrehgeschwindigkeitModifikator = -1, // Drehgeschwindigkeit einer Ameise + EnergieModifikator = -1, // Lebensenergie einer Ameise + GeschwindigkeitModifikator = 2, // Laufgeschwindigkeit einer Ameise + LastModifikator = 2, // Tragkraft einer Ameise + ReichweiteModifikator = -1, // Ausdauer einer Ameise + SichtweiteModifikator = 0 // Sichtweite einer Ameise + ), + Kaste( + Name = "Erkunder", // Name der Berufsgruppe + AngriffModifikator = -1, // Angriffsstärke einer Ameise + DrehgeschwindigkeitModifikator = -1, // Drehgeschwindigkeit einer Ameise + EnergieModifikator = -1, // Lebensenergie einer Ameise + GeschwindigkeitModifikator = 1, // Laufgeschwindigkeit einer Ameise + LastModifikator = -1, // Tragkraft einer Ameise + ReichweiteModifikator = 1, // Ausdauer einer Ameise + SichtweiteModifikator = 2 // Sichtweite einer Ameise + ), + Kaste( + Name = "Krieger", // Name der Berufsgruppe + AngriffModifikator = 2, // Angriffsstärke einer Ameise + DrehgeschwindigkeitModifikator = 0, // Drehgeschwindigkeit einer Ameise + EnergieModifikator = 1, // Lebensenergie einer Ameise + GeschwindigkeitModifikator = 0, // Laufgeschwindigkeit einer Ameise + LastModifikator = -1, // Tragkraft einer Ameise + ReichweiteModifikator = -1, // Ausdauer einer Ameise + SichtweiteModifikator = -1 // Sichtweite einer Ameise + )] + + public class BrainArmyAntsKlasse : Basisameise + { + private static Bau bau = null; + private static readonly Random rand = new Random(); + private static readonly List VorkZuckers = new List(); + private static readonly List RemovedZuckers = new List(); + private static readonly List VorkObsts = new List(); + private static readonly List VorkFeinde = new List(); + private static int GestorbeneAmeisen = 0; + private static int GetoeteteAmeisen = 0; + + private Spielobjekt _z; + private Insekt _aktuellerFeind; + + #region Kasten + + /// + /// Jedes mal, wenn eine neue Ameise geboren wird, muss ihre Berufsgruppe + /// bestimmt werden. Das kannst du mit Hilfe dieses Rückgabewertes dieser + /// Methode steuern. + /// Weitere Infos unter http://wiki.antme.net/de/API1:BestimmeKaste + /// + /// Anzahl Ameisen pro Kaste + /// Name der Kaste zu der die geborene Ameise gehören soll + public override string BestimmeKaste(Dictionary anzahl) + { + int count = 0; + foreach(KeyValuePair entry in anzahl) + { + count += entry.Value; + } + if (anzahl["Krieger"] < 6 || anzahl["Sammler"] > anzahl["Krieger"] * (GetoeteteAmeisen/(GestorbeneAmeisen+1))) + return "Krieger"; + if (anzahl["Sammler"] > anzahl["Erkunder"] * 20) + return "Erkunder"; + + + // Gibt den Namen der betroffenen Kaste zurück. + return "Sammler"; + } + + #endregion + + #region Fortbewegung + + /// + /// Wenn die Ameise keinerlei Aufträge hat, wartet sie auf neue Aufgaben. Um dir das + /// mitzuteilen, wird diese Methode hier aufgerufen. + /// Weitere Infos unter http://wiki.antme.net/de/API1:Wartet + /// + public override void Wartet() + { + } + + /// + /// Erreicht eine Ameise ein drittel ihrer Laufreichweite, wird diese Methode aufgerufen. + /// Weitere Infos unter http://wiki.antme.net/de/API1:WirdM%C3%BCde + /// + public override void WirdMüde() + { + } + + /// + /// Wenn eine Ameise stirbt, wird diese Methode aufgerufen. Man erfährt dadurch, wie + /// die Ameise gestorben ist. Die Ameise kann zu diesem Zeitpunkt aber keinerlei Aktion + /// mehr ausführen. + /// Weitere Infos unter http://wiki.antme.net/de/API1:IstGestorben + /// + /// Art des Todes + public override void IstGestorben(Todesart todesart) + { + foreach (ObstTraeger obstTraeger in VorkObsts) + { + obstTraeger.AmeiseEntfernen(this); + } + if (todesart == Todesart.Besiegt) + { + GestorbeneAmeisen++; + } + } + + /// + /// Diese Methode wird in jeder Simulationsrunde aufgerufen - ungeachtet von zusätzlichen + /// Bedingungen. Dies eignet sich für Aktionen, die unter Bedingungen ausgeführt werden + /// sollen, die von den anderen Methoden nicht behandelt werden. + /// Weitere Infos unter http://wiki.antme.net/de/API1:Tick + /// + public override void Tick() + { + if (ZurückgelegteStrecke*2+2 > Reichweite) + { + SchrittBau(); + return; + } + + + + if (Kaste == "Sammler") + { + if (AktuelleLast > 0) + { + SchrittBau(); + } + else + { + _z = BestimmeZiel(); + if (_z == null) + { + GeheGeradeaus(10); + if (rand.Next(50) == 0) + DreheUmWinkel(60); + } + else + { + SchrittZiel(_z); + } + } + } else if (Kaste == "Krieger") + { + //SprüheMarkierung(5, 10); + _z = BestimmeZiel(); + if (_z == null) + { + GeheGeradeaus(10); + if (rand.Next(50) == 0) + DreheUmWinkel(60); + } + else + { + SchrittZiel(_z); + } + } + else + { + GeheGeradeaus(); + //SprüheMarkierung(4, 30); + } + + + } + + #endregion + + #region Nahrung + + /// + /// Sobald eine Ameise innerhalb ihres Sichtradius einen Apfel erspäht wird + /// diese Methode aufgerufen. Als Parameter kommt das betroffene Stück Obst. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:Sieht(Obst)" + /// + /// Das gesichtete Stück Obst + public override void Sieht(Obst obst) + { + ObstHinzufügen(obst); + } + + /// + /// Sobald eine Ameise innerhalb ihres Sichtradius einen Zuckerhügel erspäht wird + /// diese Methode aufgerufen. Als Parameter kommt der betroffene Zuckerghügel. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:Sieht(Zucker)" + /// + /// Der gesichtete Zuckerhügel + public override void Sieht(Zucker zucker) + { + ZuckerHinzufügen(zucker); + ZuckerEntfernen(); + } + + /// + /// Hat die Ameise ein Stück Obst als Ziel festgelegt, wird diese Methode aufgerufen, + /// sobald die Ameise ihr Ziel erreicht hat. Ab jetzt ist die Ameise nahe genug um mit + /// dem Ziel zu interagieren. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:ZielErreicht(Obst)" + /// + /// Das erreichte Stück Obst + public override void ZielErreicht(Obst obst) + { + if (Kaste == "Sammler") + { + Nimm(obst); + } + } + + /// + /// Hat die Ameise eine Zuckerhügel als Ziel festgelegt, wird diese Methode aufgerufen, + /// sobald die Ameise ihr Ziel erreicht hat. Ab jetzt ist die Ameise nahe genug um mit + /// dem Ziel zu interagieren. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:ZielErreicht(Zucker)" + /// + /// Der erreichte Zuckerhügel + public override void ZielErreicht(Zucker zucker) + { + if (Kaste == "Sammler") + { + Nimm(zucker); + ZuckerEntfernen(); + } + } + + #endregion + + #region Kommunikation + + /// + /// Markierungen, die von anderen Ameisen platziert werden, können von befreundeten Ameisen + /// gewittert werden. Diese Methode wird aufgerufen, wenn eine Ameise zum ersten Mal eine + /// befreundete Markierung riecht. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:RiechtFreund(Markierung)" + /// + /// Die gerochene Markierung + public override void RiechtFreund(Markierung markierung) + { + } + + /// + /// So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + /// andere Spielelemente. Entdeckt die Ameise eine Ameise aus dem eigenen Volk, so + /// wird diese Methode aufgerufen. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:SiehtFreund(Ameise)" + /// + /// Erspähte befreundete Ameise + public override void SiehtFreund(Ameise ameise) + { + + } + + /// + /// So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + /// andere Spielelemente. Entdeckt die Ameise eine Ameise aus einem befreundeten Volk + /// (Völker im selben Team), so wird diese Methode aufgerufen. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:SiehtVerb%C3%BCndeten(Ameise)" + /// + /// Erspähte verbündete Ameise + public override void SiehtVerbündeten(Ameise ameise) + { + } + + #endregion + + #region Kampf + + /// + /// So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + /// andere Spielelemente. Entdeckt die Ameise eine Ameise aus einem feindlichen Volk, + /// so wird diese Methode aufgerufen. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:SiehtFeind(Ameise)" + /// + /// Erspähte feindliche Ameise + public override void SiehtFeind(Ameise ameise) + { + /*if (Kaste == "Sammler") + { + */FeindHinzufügen(ameise);/* + } + else */if (Kaste == "Krieger" && Koordinate.BestimmeEntfernung(this, ameise) < 4) + { + GreifeAn(ameise); + } + } + + /// + /// So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + /// andere Spielelemente. Entdeckt die Ameise eine Wanze, so wird diese Methode aufgerufen. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:SiehtFeind(Wanze)" + /// + /// Erspähte Wanze + public override void SiehtFeind(Wanze wanze) + { + } + + /// + /// Es kann vorkommen, dass feindliche Lebewesen eine Ameise aktiv angreifen. Sollte + /// eine feindliche Ameise angreifen, wird diese Methode hier aufgerufen und die + /// Ameise kann entscheiden, wie sie darauf reagieren möchte. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:WirdAngegriffen(Ameise)" + /// + /// Angreifende Ameise + public override void WirdAngegriffen(Ameise ameise) + { + } + + /// + /// Es kann vorkommen, dass feindliche Lebewesen eine Ameise aktiv angreifen. Sollte + /// eine Wanze angreifen, wird diese Methode hier aufgerufen und die Ameise kann + /// entscheiden, wie sie darauf reagieren möchte. + /// Weitere Infos unter "http://wiki.antme.net/de/API1:WirdAngegriffen(Wanze)" + /// + /// Angreifende Wanze + public override void WirdAngegriffen(Wanze wanze) + { + } + + + #endregion + + #region Eigene + + private Spielobjekt BestimmeZiel() + { + ZuckerEntfernen(); + ObstEntfernen(); + FeindEntfernen(); + var entfernung = int.MaxValue; + + + Spielobjekt s = null; + + if (Kaste == "Sammler") + { + foreach (ObstTraeger obstTraeger in VorkObsts) + { + if (obstTraeger.IstTraeger(this)) return obstTraeger.Obst; + } + foreach (var obst in VorkObsts) + { + var neu = Koordinate.BestimmeEntfernung(this, obst.Obst); + if (s != null && neu >= entfernung || neu >= Reichweite / 3 || !obst.BrauchtNochTraeger()) + continue; //Ich verstehe das "z != null &&" nicht + s = obst.Obst; + entfernung = neu; + } + + foreach (var zucker in VorkZuckers) + { + var neu = Koordinate.BestimmeEntfernung(this, zucker); + if (s != null && neu >= entfernung || neu >= Reichweite / 3) + continue; + s = zucker; + entfernung = neu; + } + + if (s is Obst) + { + VorkObsts.Find(o => o.Obst == s).AmeiseHinzufügen(this); + } + } + else if(Kaste == "Krieger") + { + if (_aktuellerFeind != null) + { + var neu = Koordinate.BestimmeEntfernung(this, _aktuellerFeind); + if (!(neu >= Reichweite / 3 && (Angriff == 0 || _aktuellerFeind.Angriff > 0 && + _aktuellerFeind.AktuelleEnergie / Angriff < + AktuelleEnergie / _aktuellerFeind.Angriff))) + return s; + } + foreach (var feind in VorkFeinde) + { + var neu = Koordinate.BestimmeEntfernung(this, feind); + if (s != null && neu >= entfernung || neu >= Reichweite / 3) + continue; + if (Angriff==0 || feind.Angriff>0 && feind.AktuelleEnergie/Angriff < AktuelleEnergie/feind.Angriff) + continue; + if (rand.Next(6)<1) + s = feind; + entfernung = neu; + } + _aktuellerFeind = (Insekt) s; + } + return s; + + } + + private void SchrittZiel(Spielobjekt ziel) + { + var dist = Koordinate.BestimmeEntfernung(this, ziel); + var angle = Koordinate.BestimmeRichtung(this, ziel); + if (Math.Abs(angle-Richtung) > 10) + DreheInRichtung(angle); + DreheZuZiel(ziel); + if (dist > 2) + GeheGeradeaus(dist/3*2); + else + GeheZuZiel(ziel); + } + + private void SchrittBau() + { + if (bau == null) + { + GeheZuBau(); + bau = (Bau) Ziel; + BleibStehen(); + } + var dist = Koordinate.BestimmeEntfernung(this, bau); + var angle = Koordinate.BestimmeRichtung(this, bau); + if (Math.Abs(angle-Richtung) > 10) + DreheInRichtung(angle); + if (dist > 4) + GeheGeradeaus(dist-2); + else + GeheZuZiel(bau); + } + + private static void ZuckerHinzufügen(Zucker zucker) + { + if (zucker.Menge > 100 && !VorkZuckers.Contains(zucker) && RemovedZuckers.All(z => z != zucker.Id)) + { + VorkZuckers.Add(zucker); + } + } + + private static void ObstHinzufügen(Obst obst) + { + if (VorkObsts.All(o => o.Obst != obst)) + { + VorkObsts.Add(new ObstTraeger(obst)); + } + } + + private static void FeindHinzufügen(Ameise feind) + { + if (feind.AktuelleEnergie > 0 && !VorkFeinde.Contains(feind)) + { + VorkFeinde.Add(feind); + } + } + + private static void ZuckerEntfernen()//Zucker zucker + { + for (int i = 0; i < VorkZuckers.Count; ) + { + var zucker = VorkZuckers[i]; + if (zucker.Menge > 0) + { + i++; + } + else + { + if (VorkZuckers.Contains(zucker)) + { + VorkZuckers.Remove(zucker); + } + if (!RemovedZuckers.Contains(zucker.Id)) + { + RemovedZuckers.Add(zucker.Id); + } + } + } + } + + private static void ObstEntfernen() + { + for (int i = 0; i < VorkObsts.Count; ) + { + var obst = VorkObsts[i]; + if (obst.Obst.Menge > 0) + { + i++; + } + else + { + VorkObsts.Remove(obst); + } + } + } + + private static void FeindEntfernen() + { + for (int i = 0; i < VorkFeinde.Count; ) + { + var feind = VorkFeinde[i]; + if (feind.AktuelleEnergie > 0) + { + i++; + } + else + { + VorkFeinde.Remove(feind); + GetoeteteAmeisen++; + } + } + } + + + #endregion + + } + + public class ObstTraeger + { + public Obst Obst; + private readonly List ameisen; + + public ObstTraeger(Obst obst) + { + Obst = obst; + ameisen = new List(); + } + + public bool BrauchtNochTraeger() + { + return ameisen.Count < 10; + } + + public void AmeiseHinzufügen(BrainArmyAntsKlasse ameise) + { + if (!IstTraeger(ameise)) + ameisen.Add(ameise); + } + + public void AmeiseEntfernen(BrainArmyAntsKlasse ameise) + { + ameisen.Remove(ameise); + } + + public bool IstTraeger(BrainArmyAntsKlasse ameise) + { + return ameisen.Contains(ameise); + } + } +} diff --git a/BrainArmyAnts/Properties/AssemblyInfo.cs b/BrainArmyAnts/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..78c9383 --- /dev/null +++ b/BrainArmyAnts/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("AntMe! Player")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AntMe!")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c9150cc8-d3d1-4c58-88d4-21467cc3e5cd")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/BrainArmyAnts/bin/AntMe.Player.BrainArmyAnts.dll b/BrainArmyAnts/bin/AntMe.Player.BrainArmyAnts.dll new file mode 100644 index 0000000..daa2beb Binary files /dev/null and b/BrainArmyAnts/bin/AntMe.Player.BrainArmyAnts.dll differ diff --git a/BrainArmyAnts/bin/AntMe.Player.BrainArmyAnts.pdb b/BrainArmyAnts/bin/AntMe.Player.BrainArmyAnts.pdb new file mode 100644 index 0000000..66aee83 Binary files /dev/null and b/BrainArmyAnts/bin/AntMe.Player.BrainArmyAnts.pdb differ diff --git a/BrainArmyAnts/bin/AntMe.SharedComponents.dll b/BrainArmyAnts/bin/AntMe.SharedComponents.dll new file mode 100644 index 0000000..c81c29c Binary files /dev/null and b/BrainArmyAnts/bin/AntMe.SharedComponents.dll differ diff --git a/BrainArmyAnts/bin/AntMe.SharedComponents.xml b/BrainArmyAnts/bin/AntMe.SharedComponents.xml new file mode 100644 index 0000000..fb2e263 --- /dev/null +++ b/BrainArmyAnts/bin/AntMe.SharedComponents.xml @@ -0,0 +1,1430 @@ + + + + AntMe.SharedComponents + + + + + Exception for special AntMe-Exceptions. + + + + + Class, to read and decode ant-video-Streams. + + + + + Creates a new instance of reader. + + input-stream + + + + Reads a new simulation-state out of stream. + + New simulation-state or null, if stream is over + + + + Gives the current frame-position. + + + + + Gives the number of total frames. + + + + + Class, to stream some simulation state as ant-video-stream. + + + + + Creates a new instance of ant-video-writer. + + output-stream + + + + Writes a new state to the stream. + + New state + + + + Close the writer. + + + + + List of possible block-types in stream. + + + + + Holds information about an ant. + + + + + Base-class for all colony-based and index-based states. + + + + + Base-class for all index-based states + + + + + Constructor of this state. + + + + + + Compares two IndexBasedStates + + other state + compare-result + + + + Gets the id of this state. + + + + + Constructor of this state. + + colony-id + id + + + + Gets the colony-id of this state. + + + + + Constructor of ant-state + + Colony-id + id + + + + Gets or sets the id of the caste. + + + + + Gets or sets the direction. + + + + + Gets or sets the load. + + + + + Gets or sets the type of load. + + + + + Gets or sets the x-part of position. + + + + + Gets or sets the kind of target. + + + + + Gets or sets the x-part of the target position. + + + + + Gets or sets the y-part of the target position. + + + + + Gets or sets the y-part of position. + + + + + Gets or sets the vitality. + + + + + View Range + + + + + Debug Message + + + + + Interface for all updateable item-states + + + + + Calculates the next state based on the last update-information + + + + + Delivers a new update-information + + new Update + + + + Generates a new update-information based on given state + + update-information + + + + Generates a state of current states + + state + + + + Flag to mark activity + + + + + Interface for all serializable blocks. + + + + + Serializes the object into the given stream. + + output-stream + + + + De-serializes the object out of given stream. + + input-stream + + + + Holds information about an anthill. + + + + + Constructor of anthill-state + + Colony-id + id + + + + Gets or sets the x-part of position. + + + + + Gets or sets the y-part of position. + + + + + Gets or sets the radius. + + + + + Liste der Felder, die sich durch ein Update ändern könnten + + + + + Basisklasse für alle Updateblocks für ein einheitliches Speichern der veränderten Felder + + + + + Sets the given field to changed-state + + Changed field + + + + Indicates changes in given field. + + field to check + Changes in field + + + + Serializes the updateinformation into the given stream. + + outputstream + + + + Deserializes the updateinformation out of given stream. + + inputstream + + + + Gets or sets the id. + + + + + Holds information about bugs. + + + + + Constructor of bugstate. + + id + + + + Gets or sets the x-part of the position. + + + + + Gets or sets the y-part of the position. + + + + + Gets or sets the direction. + + + + + Gets or sets the vitality. + + + + + Holds the information of one colony in a simulation-state. + + + + + Constructor of colony-state + + id + + + + Constructor of colony-state + + id of this colony + guid + Name of this colony + Name of player + + + + Gets a list of ants. + + + + + Gets a list of anthills. + + + + + Gets a list of markers. + + + + + gets a list of castes. + + + + + Gets or sets the guid of the colony. + + + + + Gets or sets the name of this colony. + + + + + Gets or sets the name of the player. + + + + + Gets or sets the count of starved ants. + + + + + Gets or sets the count of eaten ants. + + + + + Gets or sets the count of beaten ants. + + + + + Gets or sets the count of killed bugs. + + + + + Gets or sets the count of killed enemies. + + + + + Gets or sets the amount of collected food. + + + + + Gets or sets the amount of collected fruits. + + + + + Gets or sets the total points. + + + + + Setzt die Updatedaten auf erwartete Werte + + + + + Repräsentiert den Zustandsblock + + + + + Holds the information of one single simulation-step + + + + + Constructor to initialize the lists. + + + + + Constructor to initialize the lists and set the basic parameters. + + width of the playground + height of the playground + the current round + the number of total rounds + + + + Constructor to initialize the lists and set the basic parameters. + + width of the playground + height of the playground + the current round + the number of total rounds + the time-stamp of this simulation-state + + + + Gets a list of bugs. + + + + + Gets a list of fruits. + + + + + Gets a list of teams. + + + + + Gets a list of sugar. + + + + + Gets the list of custom fields. + + + + + Gets or sets the time-stamp of this simulation-state. + + + + + Gets or sets the number of total rounds. + + + + + Gets or sets the number of current round. + + + + + Gets or sets the width of the playground. + + + + + Gets or sets the height of the playground. + + + + + Holds information about fruit. + + + + + Constructor of fruit-state. + + id + + + + Gets or sets the amount of fruit. + + + + + Gets or sets the x-part of the position. + + + + + Gets or sets the y-part of the position. + + + + + Gets or sets the radius. + + + + + Gets or sets the number of carrying ants. + + + + + Holds the information of a team of multiple colonies. + + + + + Constructor of team-state + + id + + + + Constructor of team-state + + id of this team + guid + Name of this team + + + + gets a list of castes. + + + + + Gets or sets the guid of the team. + + + + + Gets or sets the name of the team. + + + + + Holds information about a marker. + + + + + Constructor of marker-state. + + Colony-id + id + + + + Gets or sets the x-part of the position. + + + + + Gets or sets the y-part of the position. + + + + + Gets or sets the radius. + + + + + Gets or sets the direction. + + + + + Holds information about ant-castes + + + + + + Gets or sets the attack-modificator. + + + + + Gets or sets the load-modificator. + + + + + Gets or sets the name of this caste. + + + + + Gets or sets the range-modificator. + + + + + Gets or sets the rotation-speed-modificator. + + + + + Gets or sets the speed-modificator. + + + + + Gets or sets the view-range-modificator. + + + + + Gets or sets the vitality-modificator. + + + + + Holds information about sugar. + + + + + Constructor of sugar-state + + id + + + + Gets or sets the load of sugar. + + + + + Gets or sets the x-part of the position. + + + + + Gets or sets the y-part of the position. + + + + + Gets or sets the radius. + + + + + Possible Fields of sugarupdate + + + + + Gets or sets the absolute value of amount. + + + + + Gets or sets the absolute value for radius. + + + + + Namespace Doc zu AntVideo + + + + + Class, to manage all serialize-tasks. + + + + + Reads the next block out of stream. + + the found block + type of found block + + + + Writes the hello-header to stream. + + + + + Reads hello-header out of stream. + + + + + Writes a given block to stream. + + type of given block + block, to write + + + + Writes a given block to stream. + + type of block + + + + Reads the following byte without affect the streamposition. + + next byte + + + + Close stream. + + + + + Sendet einen ushort über den Stream + + ushort + + + + Sends a short + + short + + + + Sendet einen sbyte über den angegebenen stream + + sbyte + + + + Sendet einen integer über den Stream + + integer + + + + Sendet einen string über den Stream + + string + + + + Liest den nächsten ushort aus dem angegebenen Stream + + ausgelesener ushort + + + + Liest das nächste sbyte aus dem angegebenen Stream + + ausgelesener sbyte + + + + Liest einen Integer aus dem Stream + + gelesener int + + + + Liest einen String aus dem stream + + string + + + + Liest einen DateTime aus dem Stream aus + + DateTime + + + + This is the Namespace Documentation for AntMe.SharedComponents + + + + + Namespace Doku für Plugin + + + + + Attribute, to signal, that the marked plugin reads the custom field. + + + + + The name of the custom field. + + + + + The full name of the used type. + + + + + Optional description of usage. + + + + + Attribute, to signal, that the marked plugin writes the custom field. + + + + + The name of the custom field. + + + + + The full name of the used type. + + + + + Optional description of usage. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Abby + Abelina + Abigail + Adelaide + Adeline + Adina + Adriana + Adrienne + Afra + Agatha + Agnes + Aida + Aimee + Aischa + Ajlin + Albertine + Alea + Aleksandra + Alena + Alessa + Alessandra + Alessia + Alexa + Alexandra + Alexia + Alexis + Alice + Alicia + Alida + Alina + Aline + Alisa + Alissa + Alisson + Amabella + Amadea + Amanda + Amelia + Amelie + Amina + Amy + Ana + Anastasia + Andrea + Andrina + Anette + Angela + Angelika + Angelina + Angelique + Anina + Anine + Anita + Anja + Anjalie + Anke + Ann + Anna + Annabel + Annabell + Annabella + Annabelle + Anne + A [rest of string was truncated]";. + + + + + Looks up a localized string similar to Christoph + Dominik + Hardy + Immo + Patric + Sebastian + Stefan + Tom + Uwe + Wolfgang. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to AntVI-Stream delivered an invalid start block. Expected: FrameStart. Received: {0}.. + + + + + Looks up a localized string similar to The input stream could not be read.. + + + + + Looks up a localized string similar to The input stream has not been set.. + + + + + Looks up a localized string similar to AntVI-Stream delivered an invalid element: {0}.. + + + + + Looks up a localized string similar to The stream does not contain the AntVi-format.. + + + + + Looks up a localized string similar to The stream contains an AntVI-version that could not be processed ({0}.{1}.{2}.{3}).. + + + + + Namespace doku für States + + + + + Stellt eine Farbe im RGB-Farbraum dar. + + + Diese Struktur wurde definiert um von den in Windows Forms und Managed + DirectX definierten Farben unabhängig zu sein. Zusätzlich können Farben + durch die Verwendung dieser Struktur gemischt werden. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Der Farbe Konstruktor. + + Rot-Wert + Grün-Wert + Blau-Wert + + + + Gibt die Farbe als Zeichenkette zurück. + + (Rot,Grün,Blau) + + + + Addiert die RGB-Werte zweier Farben. + + Um zwei Farben zu mischen muß zusätzlich eine Division durchgeführt + werden: (farbe1 + farbe2) / 2. + + Farbe 1 + Farbe 2 + Farbe + + + + Multipliziert die RGB-Werte einer Farbe mit einer Zahl. + + Farbe + Zahl + Farbe + + + + Dividiert die RGB-Werte einer Farbe durch eine Zahl. + + Farbe + Zahl + Farbe + + + + Bestimmt ein Abstand-Maß zwischen zwei Farben im RGB-Farbraum. + + Wird von der Farbberater-Klasse verwendet. + + Farbe 1 + Farbe 2 + Abstand² + + + + Der Rot-Wert der Farbe. + + + + + Der Grün-Wert der Farbe. + + + + + Der Blau-Wert der Farbe. + + + + + Liefert Farben die sie möglichst stark voneinander Unterscheiden. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Markiert eine neue Farbe als bereits vorhanden. + + Neue Farbe. + + + + Entfernt eine vorhandene Farbe. + + Vorhandene Farbe. + + + + Erzeugt eine neue Farbe mit möglichst großem Abstand zu den bereits + vorhandenen Farben. + + Neue Farbe. + + + + Erzeugt eine neue Farbe mit möglichst großem Abstand zu den bereits + vorhandenen Farben und verändert sie leicht. + + Neue Farbe. + + + + Erzeugt eine neue Farbe mit möglichst großem Abstand zu den bereits + vorhandenen Farben und markiert sie als belegt. + + Neue Farbe. + + + + Erzeugt eine neue Farbe mit möglichst großem Abstand zu den bereits + vorhandenen Farben, verändert sie leicht und markiert sie als belegt. + + Neue Farbe. + + + + Interface for all consuming plugins. + + Tom Wendel (tom@antme.net) + + + + Base-Interface for all AntMe-Plugins. + + Tom Wendel (tom@antme.net) + + + + Starts the plugin-activity or resumes activity, if paused. Only called by UI-Thread. + + + + + Stops the plugin-activity. Only called by UI-Thread. + + + + + Pauses the activity or starts and pauses, if stopped. Only called by UI-Thread. + + + + + Delivers the start-parameter from main application to this plugin. Only called by UI-Thread. + + start-parameter + + + + Sets the state of visibility of plugins user-control. Only called by UI-Thread. + + is user-control visible in main window + + + + Updates UI. Only called by UI-Thread. + + + + + Plugin-Description. Only called by UI-Thread. + + + + + Plugin-Guid. Only called by UI-Thread. + + + + + Plugin-Name. Only called by UI-Thread. + + + + + Plugin-Version. Only called by UI-Thread. + + + + + Gets the current plugin-state. Called by UI- and GameLoop-Thread. + + + + + Gets the plugin-user-control so show in main application or null, if there is no user-control. Only called by UI-Thread. + + + + + Gets or sets the settings for this plugin. usually a serialized configuration-class. Only called by UI-Thread. + + + + + Sends the empty state to push some custom fields to control the simulation. Only called by GameLoop-Thread. + + empty state + + + + Sends the filled state to push some custom fields to control the other consumers. Only called by GameLoop-Thread. + + filled state + + + + Sends the complete filled state to consume. Only called by GameLoop-Thread. + + complete state + + + + Allows a plugin to signal an interrupt. Only called by GameLoop-Thread. + + + + + Interface for all producing plugins in antme. + + Tom Wendel (tom@antme.net) + + + + Sends the filled state from consumers to the producer to put in the . Only called by GameLoop-Thread. + + filled state + + + + List of possible plugin-states. + + Tom Wendel (tom@antme.net) + + + + Indicates a not startable state. + + + + + Shows the ability to start. Also pause is a possible command. + + + + + Indicates a running plugin. Plugin can pause and stop. + + + + + Plugin is suspended. It can resume again via start or stop complete. + + + + + Holds custom Plugin-Information + + + + + Adds the specified key. + + The key. + The value. + + + + Removes the specified key. + + The key. + + + + + Removes the specified value. + + The value. + + + + + Gets a value indicating whether this instance has value. + + true if this instance has value; otherwise, false. + + + + Gets or sets the with the specified key. + + + + + + Gets a list of available keys. + + + + + List of possible loads. + + + + + No load + + + + + Sugar + + + + + Fruit + + + + + List of possible targets for an ant. + + + + + There is no target. + + + + + Target is an ant. + + + + + Target is an anthill. + + + + + Target are bugs. + + + + + Target is fruit. + + + + + Target is a marker. + + + + + Target is sugar. + + + + + Attribute to mark a plugin as important that should be selected at the + first start of AntMe. This attribute only takes effect, if there is no + configuration-file from earlier starts. + + Tom Wendel (tom@antme.net) + + + + A static helper class that returns female and male first names. + + Wolfgang Gallo (wolfgang@antme.net) + + + + An array of female first names. + + + + + An array of male first names. + + + + + Returns a female first name for a given hash value. + + + The same hash value will always return the same name within an application session. + + A value to use for hashing, for example an id. + A female first name. + + + + Returns a male first name for a given hash value. + + + The same hash value will always return the same name within an application session. + + A value to use for hashing, for example an id. + A male first name. + + + + Namespace Doku für Tools + + + + diff --git a/BrainArmyAnts/bin/AntMe.Simulation.dll b/BrainArmyAnts/bin/AntMe.Simulation.dll new file mode 100644 index 0000000..132d864 Binary files /dev/null and b/BrainArmyAnts/bin/AntMe.Simulation.dll differ diff --git a/BrainArmyAnts/bin/AntMe.Simulation.xml b/BrainArmyAnts/bin/AntMe.Simulation.xml new file mode 100644 index 0000000..be39ce0 --- /dev/null +++ b/BrainArmyAnts/bin/AntMe.Simulation.xml @@ -0,0 +1,4915 @@ + + + + AntMe.Simulation + + + + + Repräsentiert eine Ameise + + + + + Repräsentiert ein beliebiges Lebewesen auf dem Spielfeld + + + + + Allgemeines Spielelement + + + + + Speichert die Referenz auf das original Spielobjekt + + + + + operator == + + Vergleichsobjekt 1 + Vergleichsobjekt 2 + + + + + operator != + + Vergleichsobjekt 1 + Vergleichsobjekt 2 + + + + + Vergleicht dieses Element mit einem anderen + + Vergleichsobjekt + Haben den gleichen Inhalt + + + + Erstellt einen eindeutigen Code für dieses Objekt + + eindeutiger Code + + + + Gibt das Basiselement zurück + + + + + Liefert die eindeutige ID dieses Elements + + + + + Liefer die eindeutige ID dieses Insektes + + + + + Gibt die aktuelle Lebensenergie an + + + + + Gibt die aktuelle geschwindigkeit an + + + + + Gibt die Angriffsstärke an + + + + + Gibt die aktuelle Geschwindigkeit an + + + + + Gibt die maximale Lebensenergie an + + + + + Gibt die maximale Geschwindigkeit an + + + + + Gibt die Sichtweite an + + + + + Gibt den noch zu rotierenden Winkel an + + + + + Gibt die Ausrichtung der Ameise an + + + + + Gibt die noch zu laufende Strecke an + + + + + Liefert die aktuelle Last + + + + + Liefert einen Verweis auf das aktuell getragene Obst + + + + + Liefert die maximale Belastbarkeit der Ameise + + + + + Liefert die Reichweite der Ameise + + + + + Liefet den Volknamen dieser Ameise + + + + + Basisklasse für die Implementierung einer deutschen Ameise. Hier befinden sich + alle notwendigen Methoden, Eigenschaften und Events zur Interaktion mit der Umgebung. + Weitere Infos + + + + + Abstrakte Basisklasse für alle Ameisen. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Abstrakte Basisklasse für alle Insekten. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Ermöglicht es, die Koordinate eines Objekts auf dem Spielfeld abzufragen. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Liest die Koordinate eines Objekts auf dem Spielfeld aus. + + + + + Die Id des nächste erzeugten Insekts. + + + + + Speichert die Markierungen, die das Insekt schon gesehen hat. Das + verhindert, daß das Insekt zwischen Markierungen im Kreis läuft. + + + + + Die Id die das Insekt während eines Spiels eindeutig indentifiziert. + + + + + Die Position des Insekts auf dem Spielfeld. + + + + + Legt fest, ob das Insekt Befehle entgegen nimmt. + + + + + Der Index der Kaste des Insekts in der Kasten-Struktur des Spielers. + + + + + Das Volk zu dem das Insekts gehört. + + + + + Der abstrakte Insekt-Basiskonstruktor. + + Das Volk zu dem das neue Insekt gehört. + Hier unbenutzt! + + + + Gibt an, ob weitere Insekten benötigt werden, um ein Stück Obst zu + tragen. + + Obst + + + + + Dreht das Insekt um den angegebenen Winkel. Die maximale Drehung beträgt + -180 Grad (nach links) bzw. 180 Grad (nach rechts). Größere Werte werden + abgeschnitten. + + Winkel + + + + Dreht das Insekt in die angegebene Richtung (Grad). + + Richtung + + + + Dreht das Insekt in die Richtung des angegebenen Ziels. + + Ziel + + + + Dreht das Insekt um 180 Grad. + + + + + Lässt das Insekt unbegrenzt geradeaus gehen. + + + + + Lässt das Insekt die angegebene Entfernung in Schritten geradeaus gehen. + + Die Entfernung. + + + + Lässt das Insekt auf ein Ziel zugehen. Das Ziel darf sich bewegen. + Wenn das Ziel eine Wanze ist, wird dieser angegriffen. + + Das Ziel. + + + + Lässt das Insekt ein Ziel angreifen. Das Ziel darf sich bewegen. + In der aktuellen Version kann das Ziel nur eine Wanze sein. + + Ziel + + + + Lässt das Insekt von der aktuellen Position aus entgegen der Richtung zu + einer Quelle gehen. Wenn die Quelle ein Insekt eines anderen Volkes ist, + befindet sich das Insekt auf der Flucht. + + Die Quelle. + + + + Lässt das Insekt von der aktuellen Position aus die angegebene + Entfernung in Schritten entgegen der Richtung zu einer Quelle gehen. + Wenn die Quelle ein Insekt eines anderen Volkes ist, befindet sich das + Insekt auf der Flucht. + + Die Quelle. + Die Entfernung in Schritten. + + + + Lässt das Insekt zum nächsten Bau gehen. + + + + + Lässt das Insekt anhalten. Dabei geht sein Ziel verloren. + + + + + Lässt das Insekt Zucker von einem Zuckerhaufen nehmen. + + Zuckerhaufen + + + + Lässt das Insekt ein Obststück nehmen. + + Das Obststück. + + + + Lässt das Insekt die aktuell getragene Nahrung fallen. Das Ziel des + Insekts geht dabei verloren. + + + + + Lässt die Ameise eine Markierung sprühen. Die Markierung enthält die + angegebene Information und breitet sich um die angegebene Anzahl an + Schritten weiter aus. Je weiter sich eine Markierung ausbreitet, desto + kürzer bleibt sie aktiv. + + Die Information. + Die Ausbreitung in Schritten. + + + + Lässt die Ameise eine Markierung sprühen. Die Markierung enthält die + angegebene Information und breitet sich nicht aus. So hat die Markierung + die maximale Lebensdauer. + + Die Information. + + + + Berechnet die Bewegung des Insekts. + + + + + Die aktuelle Geschwindigkeit des Insekts in der internen Einheit. + + + + + Die Kaste des Insekts. + + + + + Die Anzahl von Wanzen in Sichtweite des Insekts. + + + + + Die Anzahl feindlicher Ameisen in Sichtweite des Insekts. + + + + + Die Anzahl befreundeter Ameisen in Sichtweite des Insekts. + + + + + Die Anzahl befreundeter Ameisen der selben Kaste in Sichtweite des + Insekts. + + + + + Anzahl Ameisen aus befreundeten Völkern in sichtweite des Insekts. + + + + + Die Richtung in die das Insekt gedreht ist. + + + + + Die Strecke die die Ameise zurückgelegt hat, seit sie das letzte Mal in + einem Ameisenbau war. + + + + + Die Strecke die die Ameise zurückgelegt hat, seit sie das letzte Mal in + einem Ameisenbau war in der internen Einheit. + + + + + Die Strecke die das Insekt geradeaus gehen wird, bevor das nächste Mal + Wartet() aufgerufen wird bzw. das Insekt sich zu seinem Ziel ausrichtet. + + + + + Die Strecke die das Insekt geradeaus gehen wird, bevor das nächste + Mal Wartet() aufgerufen wird bzw. das Insekt sich zu seinem Ziel + ausrichtet in der internen Einheit. + + + + + Der Winkel um den das Insekt sich noch drehen muß, bevor es wieder + geradeaus gehen kann. + + + + + Das Ziel auf das das Insekt zugeht. + + + + + Liefert die Entfernung in Schritten zum nächsten Ameisenbau. + + + + + Gibt das Obst zurück, das das Insekt gerade trägt. + + + + + Gibt zurück on das Insekt bei seinem Ziel angekommen ist. + + + + + Die Position des Insekts auf dem Spielfeld. + + + + + Die aktuelle Geschwindigkeit des Insekts in Schritten. Wenn das Insekt + seine maximale Last trägt, halbiert sich seine Geschwindigkeit. + + + + + Die maximale Geschwindigkeit des Insekts. + + + + + Die Drehgeschwindigkeit des Insekts in Grad pro Runde. + + + + + Die Last die die Ameise gerade trägt. + + + + + Die maximale Last die das Insekt tragen kann. + + + + + Die Sichtweite des Insekts in Schritten. + + + + + Die Sichtweite des Insekts in der internen Einheit. + + + + + Die Reichweite des Insekts in Schritten. + + + + + Die Reichweite des Insekts in der internen Einheit. + + + + + Die verbleibende Energie des Insekts. + + + + + Die maximale Energie des Insetks. + + + + + Die Angriffstärke des Insekts. Wenn das Insekt Last trägt ist die + Angriffstärke gleich Null. + + + + + Bestimmt die Kaste einer neuen Ameise. + + Die Anzahl der von jeder Klaste bereits vorhandenen Ameisen. + Der Name der Kaste der Ameise. + + + + Erzeugt ein AmeiseZustand-Objekt mit den aktuellen Daten der Ameise. + + + + + Wird wiederholt aufgerufen, wenn der die Ameise nicht weiss wo sie + hingehen soll. + + + + + Wird einmal aufgerufen, wenn die Ameise ein Drittel ihrer maximalen + Reichweite überschritten hat. + + + + + Wird wiederholt aufgerufen, wenn die Ameise mindestens einen + Zuckerhaufen sieht. + + Der nächstgelegene Zuckerhaufen. + + + + Wird wiederholt aufgerufen, wenn die Ameise mindstens ein + Obststück sieht. + + Das nächstgelegene Obststück. + + + + Wird einmal aufgerufen, wenn die Ameise einen Zuckerhaufen als Ziel + hat und bei diesem ankommt. + + Der Zuckerhaufen. + + + + Wird einmal aufgerufen, wenn die Ameise ein Obststück als Ziel hat und + bei diesem ankommt. + + Das Obstück. + + + + Wird einmal aufgerufen, wenn die Ameise eine Markierung des selben + Volkes riecht. Einmal gerochene Markierungen werden nicht erneut + gerochen. + + Die nächste neue Markierung. + + + + Wird wiederholt aufgerufen, wenn die Ameise mindstens eine Ameise des + selben Volkes sieht. + + Die nächstgelegene befreundete Ameise. + + + + Wird wiederholt aufgerufen, wenn die Ameise mindestens eine Ameise verbündeter + Völker sieht. + + + + + + Wird wiederholt aufgerufen, wenn die Ameise mindestens eine Wanze + sieht. + + Die nächstgelegene Wanze. + + + + Wird wiederholt aufgerufen, wenn die Ameise mindestens eine Ameise eines + anderen Volkes sieht. + + Die nächstgelegen feindliche Ameise. + + + + Wird wiederholt aufgerufen, wenn die Ameise von einer Wanze angegriffen + wird. + + Die angreifende Wanze. + + + + Wird wiederholt aufgerufen in der die Ameise von einer Ameise eines + anderen Volkes Ameise angegriffen wird. + + Die angreifende feindliche Ameise. + + + + Wird einmal aufgerufen, wenn die Ameise gestorben ist. + + Die Todesart der Ameise + + + + Wird unabhängig von äußeren Umständen in jeder Runde aufgerufen. + + + + + Gibt an, ob die Ameise müde ist. + + + + + Jedes mal, wenn eine neue Ameise geboren wird, muss ihre Berufsgruppe + bestimmt werden. Das kannst du mit Hilfe dieses Rückgabewertes dieser + Methode steuern. + Weitere Infos + + Anzahl Ameisen pro Kaste + Name der Kaste zu der die geborene Ameise gehören soll + + + + Wenn eine Ameise stirbt, wird diese Methode aufgerufen. Man erfährt dadurch, wie + die Ameise gestorben ist. Die Ameise kann zu diesem Zeitpunkt aber keinerlei Aktion + mehr ausführen. + Weitere Infos + + Art des Todes + + + + Markierungen, die von anderen Ameisen platziert werden, können von befreundeten Ameisen + gewittert werden. Diese Methode wird aufgerufen, wenn eine Ameise zum ersten Mal eine + befreundete Markierung riecht. + Weitere Infos + + Die gerochene Markierung + + + + Sobald eine Ameise innerhalb ihres Sichtradius einen Apfel erspäht wird + diese Methode aufgerufen. Als Parameter kommt das betroffene Stück Obst. + Weitere Infos + + Das gesichtete Stück Obst + + + + Sobald eine Ameise innerhalb ihres Sichtradius einen Zuckerhügel erspäht wird + diese Methode aufgerufen. Als Parameter kommt der betroffene Zuckerghügel. + Weitere Infos + + Der gesichtete Zuckerhügel + + + + So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + andere Spielelemente. Entdeckt die Ameise eine Ameise aus einem feindlichen Volk, + so wird diese Methode aufgerufen. + Weitere Infos + + Erspähte feindliche Ameise + + + + So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + andere Spielelemente. Entdeckt die Ameise eine Wanze, so wird diese Methode aufgerufen. + Weitere Infos + + Erspähte Wanze + + + + So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + andere Spielelemente. Entdeckt die Ameise eine Ameise aus dem eigenen Volk, so + wird diese Methode aufgerufen. + Weitere Infos + + Erspähte befreundete Ameise + + + + So wie Ameisen unterschiedliche Nahrungsmittel erspähen können, entdecken Sie auch + andere Spielelemente. Entdeckt die Ameise eine Ameise aus einem befreundeten Volk + (Völker im selben Team), so wird diese Methode aufgerufen. + Weitere Infos + + Erspähte verbündete Ameise + + + + Diese Methode wird in jeder Simulationsrunde aufgerufen - ungeachtet von zusätzlichen + Bedingungen. Dies eignet sich für Aktionen, die unter Bedingungen ausgeführt werden + sollen, die von den anderen Methoden nicht behandelt werden. + Weitere Infos + + + + + Wenn die Ameise keinerlei Aufträge hat, wartet sie auf neue Aufgaben. Um dir das + mitzuteilen, wird diese Methode hier aufgerufen. + Weitere Infos + + + + + + Es kann vorkommen, dass feindliche Lebewesen eine Ameise aktiv angreifen. Sollte + eine Wanze angreifen, wird diese Methode hier aufgerufen und die Ameise kann + entscheiden, wie sie darauf reagieren möchte. + Weitere Infos + + Angreifende Wanze + + + + Erreicht eine Ameise ein drittel ihrer Laufreichweite, wird diese Methode aufgerufen. + Weitere Infos + + + + + Hat die Ameise ein Stück Obst als Ziel festgelegt, wird diese Methode aufgerufen, + sobald die Ameise ihr Ziel erreicht hat. Ab jetzt ist die Ameise nahe genug um mit + dem Ziel zu interagieren. + Weitere Infos + + Das erreichte Stück Obst + + + + Hat die Ameise eine Zuckerhügel als Ziel festgelegt, wird diese Methode aufgerufen, + sobald die Ameise ihr Ziel erreicht hat. Ab jetzt ist die Ameise nahe genug um mit + dem Ziel zu interagieren. + Weitere Infos + + Der erreichte Zuckerhügel + + + + Die Ameise dreht sich in die angegebene Richtung. Die Drehrichtung wird + dabei automatisch bestimmt. + Weitere Infos + + Zielrichtung + + + + Die Ameise dreht sich um den angegebenen Winkel. Positive Werte drehen + die Ameise nach rechts, negative nach links. + Weitere Infos + + Winkel + + + + Die Ameise dreht sich um 180 Grad in die entgegengesetzte Richtung. Hat + die selbe Wirkung wie DreheUmWinkel(180). + Weitere Infos + + + + + Die Ameise dreht sich in die Richtung des angegebenen Ziels. + Weitere Infos + + Anvisiertes Ziel + + + + Die Ameise bleibt stehen und vergisst ihr aktuelles Ziel. In der nächsten + Runde wird das Ereignis Wartet() aufgerufen werden. + Weitere Infos + + + + + Die Ameise geht geradeaus. Das Ziel der Ameise bleibt unangetastet. Wenn + ein Wert angegeben wird, wird die Ameise wieder ihr Ziel anvisieren, + nachdem sie die angegebene Entfernung zurückgelegt hat. + Weitere Infos + + + + + Die Ameise geht geradeaus. Das Ziel der Ameise bleibt unangetastet. Wenn + ein Wert angegeben wird, wird die Ameise wieder ihr Ziel anvisieren, + nachdem sie die angegebene Entfernung zurückgelegt hat. + Weitere Infos + + Zu laufende Strecke in Ameisenschritten + + + + Die Ameise dreht sich in die Richtung die vom angegebenen Ziel weg zeigt + und geht dann geradeaus. Das Ziel der Ameise bleibt unangetastet und es + kann eine Entfernung angegeben werden. + Weitere Infos + + Objekt, vor dem weggegangen werden soll + + + + Die Ameise dreht sich in die Richtung die vom angegebenen Ziel weg zeigt + und geht dann geradeaus. Das Ziel der Ameise bleibt unangetastet und es + kann eine Entfernung angegeben werden. + Weitere Infos + + Objekt, vor dem weggegangen werden soll + Entfernung, die zurückgelegt werden soll + + + + Die Ameise speichert das angegebene Ziel und geht dort hin. + Weitere Infos + + Ziel + + + + Die Ameise speichert den nächstgelegenen Bau als Ziel und geht dort hin. + Weitere Infos + + + + + Die Ameise speichert die angegebene Wanze oder die angegebene feindliche + Ameise als Ziel und geht dort hin. Wenn die Ameise angekommen ist, + beginnt der Kampf. + Weitere Infos + + Angriffsziel + + + + Die Ameise nimmt die angegebene Nahrung auf. Bei einem Zuckerhaufen nimmt + sie so viel wie möglich weg, bis sie ihre maximale Last erreicht hat + (siehe und ). + Im Falle eines Obststückes beginnt die Ameise das Obst zu tragen + (siehe ). + Weitere Infos + + Nahrung + + + + Die Ameise lässt die gerade getragene Nahrung fallen. Zucker geht dabei + verloren, Äpfel bleiben liegen und können wieder aufgenommen werden. Der + Befehl muss nicht ausgeführt werden um Nahrung im Bau abzuliefern. Das + passiert dort automatisch. + Weitere Infos + + + + + Die Ameise sprüht an der aktuellen Stelle eine Duftmarkierung. Mögliche + Parameter sind eine in der Markierung hinterlegte Information (diese kann im + Ereignis Sieht(Markierung) über "markierung.Information" ausgelesen werden) und + die Ausbreitung der Markierung. Je größer die Ausbreitung, desto schneller + verschwindet die Markierung wieder. + Weitere Infos + + Information + + + + Die Ameise sprüht an der aktuellen Stelle eine Duftmarkierung. Mögliche Parameter + sind eine in der Markierung hinterlegte Information (diese kann im Ereignis + Sieht(Markierung) über markierung.Information ausgelesen werden) und die Ausbreitung + der Markierung. Je größer die Ausbreitung, desto schneller verschwindet die + Markierung wieder. + Weitere Infos + + Information + Größe der Markierung in Ameisenschritten + + + + Mit Hilfe dieses Befehls gibt die Ameise Denkblasen aus, die zur Fehlersuche + eingesetzt werden können. + Weitere Infos + + Nachricht + + + + Ermittelt ob das angegebene Obst noch mehr Ameisen zum Tragen benötigt. + Weitere Infos + + zu prüfendes Obst + Braucht noch Träger + + + + Gibt die maximale Energie der Ameise an. Die Einheit ist Lebenspunkte. + Weitere Infos + + + + + Gibt die maximale Geschwindigkeit der Ameise an. Die Einheit ist Schritte pro Runde. + Weitere Infos + + + + + Gibt die maximal tragbare Last der Ameise an. Die Einheit ist Nahrungspunkte. + Dieser Wert bestimmt, wie viel Zucker die Ameise auf einmal tragen kann und + wie schnell sie ohne die Hilfe anderer Ameisen einen Apfel tragen kann. + Weitere Infos + + + + + Gibt die Reichweite in Schritten an die die Ameise zurücklegen kann, bevor sie + vor Hunger stirbt. Nachdem die Ameise ein Drittel dieser Strecke zurückgelegt hat, + wird das Ereignis WirdMüde() aufgerufen und der Wert von IstMüde auf wahr gesetzt. + Siehe ZurückgelegteStrecke. + Weitere Infos + + + + + Gibt den Angriffswert der Ameise an. Der Angriffswert bestimmt wie viele + Lebenspunkte die Ameise einem Gegner in jeder Runde abzieht. Die Einheit + ist Lebenspunkte. + Weitere Infos + + + + + Gibt den Wahrnehmungsradius der Ameise in Schritten an. Dieser Radius bestimmt + wie weit die Ameise von Spielelementen wie z.B. Zucker entfernt sein muss damit + die Ameise sie sieht. Die Blickrichtung der Ameise spielt dabei keine Rolle. + Weitere Infos + + + + + Gibt die Geschwindigkeit an mit der sich eine Ameise drehen kann. Die Einheit + ist Grad pro Runde. + Weitere Infos + + + + + Gibt die aktuelle Energie der Ameise an. Die Einheit ist Lebenspunkte. Hat die + Ameise 0 Lebenspunkte oder weniger, dann stirbt sie. Dieser Wert ist immer + kleiner oder gleich MaximaleEnergie. + Weitere Infos + + + + + Gibt die aktuell mögliche Geschwindigkeit der Ameise an. Die Einheit ist Schritte + pro Runde. Der Wert wird von der aktuellen Last der Ameise beeinflusst. Ameisen + die unter voller Last bewegt werden, können nur die Hälfte ihrer + Maximalgeschwindigkeit erreichen. Diese Eigenschaft liefert immer einen Wert + größer 0 zurück, auch wenn die Ameise still steht. Dieser Wert ist immer kleiner + oder gleich MaximaleGeschwindigkeit. + Weitere Infos + + + + + Gibt die aktuelle Last an, die die Ameise gerade trägt. Die Einheit ist Nahrungspunkte. + Dieser Wert ist immer kleiner oder gleich MaximaleLast. + Weitere Infos + + + + + Gibt die Anzahl der Ameisen desselben Volkes des im Wahrnehmungsradius der Ameise zurück. + Das Ergebnis dieser Berechnung ist von der Sichtweite der Ameise abhängig. + Weitere Infos + + + + + Gibt die Anzahl der befreundeten Ameisen desselben Volkes und derselben Kaste im + Wahrnehmungsradius der Ameise zurück. Das Ergebnis dieser Berechnung ist von der + Sichtweite der Ameise abhängig. + Weitere Infos + + + + + Gibt die Anzahl der befreundeten Ameisen desselben Teams im Wahrnehmungsradius der Ameise zurück. + Das Ergebnis dieser Berechnung ist von der Sichtweite der Ameise abhängig. + Weitere Infos + + + + + Gibt die Anzahl der feindlichen Ameisen im Wahrnehmungsradius der Ameise zurück. + Das Ergebnis dieser Berechnung ist von der Sichtweite der Ameise abhängig. + Weitere Infos + + + + + Gibt die Anzahl der Wanzen im Wahrnehmungsradius der Ameise zurück. Das Ergebnis + dieser Berechnung ist von der Sichtweite der Ameise abhängig. + Weitere Infos + + + + + Gibt die Entfernung in Schritten zum nächstgelegenen befreundeten Ameisenbau an. + Weitere Infos + + + + + Gibt das aktuell getragene Obststück zurück. Wenn die Ameise gerade kein Obst + trägt, zeigt dieser Verweis ins Leere. + Weitere Infos + + + + + Gibt des Namen der Kaste der Ameise zurück. + Weitere Infos + + + + + Gibt das aktuelle Ziel der Ameise zurück. Wenn die Ameise gerade + kein Ziel hat, zeigt dieser Verweis ins Leere. + Weitere Infos + + + + + Gibt an ob die Ameise müde ist. Die Ameise wird müde, sobald sie ein + Drittel ihrer maximalen Reichweite zurückgelegt hat. Nach dem Übergang + des Wertes dieser Eigenschaft von falsch auf wahr wird das Ereignis + WirdMüde() aufgerufen. + Weitere Infos + + + + + Gibt an wie viele Schritte die Ameise noch geradeaus gehen wird, bevor + sie wieder ihr Ziel anvisiert. Dieser Wert wird in jeder Runde um + AktuelleGeschwindigkeit verringert. + Weitere Infos + + + + + Gibt an wie viele Grad die Ameise sich noch drehen wird, bevor sie wieder + geradeaus gehen wird. Dieser Wert wird in jeder Runde um DrehGeschwindigkeit + verringert. + Weitere Infos + + + + + Gibt die Blickrichtung der Ameise in Grad auf dem Spielfeld an. 0 ist dabei + rechts (Osten) und der Winkel öffnet sich im Uhrzeigersinn. 90 ist daher + unten (Süden), 180 rechts (Westen) und 270 oben. + Weitere Infos + + + + + Gibt an ob die Ameise an ihrem Ziel angekommen ist. + Weitere Infos + + + + + Diese Eigenschaft gibt die Gesamtanzahl an Schritten zurück die die Ameise + seit ihrem letzten Besuch in einem Ameisenbau zurückgelegt hat. Siehe Reichweite + Weitere Infos + + + + + Repräsentiert einen Ameisenbau + + + + + Liefert die ID dieses Baus + + + + + Attribut zur Anfrage von Dateizugriffen. + + + + + Attribut, um Zugriffsrechte anzufordern. + + + + + Beschreibung zur Verwendung der erteilten Zugriffsrechte. + + + + + Attribut zur Anfrage von Zugriffen auf Datenbanken. + + + + + Attribut zur Anfrage von Zugriff auf Fensterelemente. + + + + + Attribut für die Beschreibung von verschiedenen Ameisenkasten + + + + + Legt die Angriffsstärke der Ameise fest + + + + + Legt die Drehgeschwindigkeit der Ameise fest + + + + + Legt die Energie einer Ameise fest + + + + + Legt die Bewegungsgeschwindigkeit einer Ameise fest + + + + + Legt die Belastbarkeit einer Ameise fest + + + + + Legt den Namen der Ameisenkaste fest + + + + + Legt die Reichweite einer Ameise fest + + + + + Legt die Sichtweite einer Ameise fest + + + + + Hilfsklasse für Entfernungs- und Richtungsberechnungen + + + + + Bestimmt die Entfernung zwischen zwei Spielelementen + + Element 1 + Element 2 + Entfernung in Schritten + + + + Bestimmt die Entfernung zwischen zwei Spielelementen + + Element 1 + Element 2 + Entfernung in Schritten + + + + Bestimmt die Entfernung zwischen zwei Spielelementen + + Element 1 + Element 2 + Entfernung in Schritten + + + + Bestimmt die Entfernung zwischen zwei Spielelementen + + Element 1 + Element 2 + Entfernung in Schritten + + + + Ermittelt den Richtungsunterscheid zwischen zwei Spielelementen + + Element 1 + Element 2 + Entfernung in Gradschritten + + + + Ermittelt den Richtungsunterscheid zwischen zwei Spielelementen + + Element 1 + Element 2 + Entfernung in Gradschritten + + + + Ermittelt den Richtungsunterscheid zwischen zwei Spielelementen + + Element 1 + Element 2 + Entfernung in Gradschritten + + + + Ermittelt den Richtungsunterscheid zwischen zwei Spielelementen + + Element 1 + Element 2 + Entfernung in Gradschritten + + + + Repräsentiert eine Markierung + + + + + Liefert die eindeutige ID dieser Markeriung + + + + + Liefert die Information aus der Markierung + + + + + Basisklasse für alle Nahrungsmittel auf dem Spielfeld + + + + + Liefert die Menge an Nahrung + + + + + Liefer die ID dieser Nahrung + + + + + Dieser Namespace enthält alle notwendigen Klassen und Attribute für die Erstellung einer Ameise in deutscher Sprache. + + + + + Attribut zur Anfrage von Netzwerkzugriff. + + + + + Repräsentiert einen Apfel + + + + + Attribut für die spielerrelevanten Angaben zum Volk + + + + + Name des Volkes (Angabe erforderlich) + + + + + Nachname des Spielers + + + + + Vorname des Spielers + + + + + Liste möglicher Todesursachen + + + + + Ameise verhungert + + + + + Ameise wurde von Wanze gefressen + + + + + Ameise wurde von feindlichen Ameisen besiegt + + + + + Repräsentant eines Volkes + + + + + Liefert den Namen des Volkes + + + + + Repräsentiert eine Wanze + + + + + Repräsentiert einen Zuckerberg + + + + + Hilfsklasse zur Generierung von Zufallszahlen + + + + + Generiert eine Zufallszahl zwischen 0 und dem angegebenen Maximum + + Maximum + Zufallszahl + + + + Generiert eine Zufallszahl zwischen dem angegebenen Minimum und dem angegebenen Maximum + + Minumum + Maximum + Zufallszahl + + + + Baseattribute for all access-requesting attributes. + + + + + Short description of what the ant will do with the requested rights. + + + + + Represents a foreign ant + + + + + Its the interface for all lifeforms on playground + + + + + Baseclass for all items on playground + + + + + Saves the reference to the original simulation-object + + + + + Delivers a unique code for that item + + unique Code + + + + Vergleich zwischen zwei Objekten + + Vergleichsobjekt + beide meinen das gleiche Element + + + + operator == + + + + + + + + operator != + + + + + + + + Delivers the base-item + + + + + Gives the unique ID of this item + + + + + Returns the unique ID of this insect + + + + + Delivers the current energy of this ant + + + + + Delivers the current speed + + + + + Delivers the strength + + + + + Delivers the rotationspeed + + + + + delivers the maximum energy + + + + + delivers the maximum speed + + + + + delivers the viewrange + + + + + delivers the degrees to rotate + + + + + delivers the direction + + + + + delivers the distance to go + + + + + Delivers the current load of this ant. + + + + + delivers the current carried fruit. + + + + + Delivers the maximum load. + + + + + Delivers the range. + + + + + Delivers the Colony-Name. + + + + + Represents an anthill + + + + + Delivers the unique ID of this anthill + + + + + Baseclass for implementing english Ants. + Read more + + + + + Every time that a new ant is born, its job group must be set. You can do + so with the help of the value returned by this method. + Read more + + Number of ants for every caste + Caste-Name for the next ant + + + + This method is called if an ant dies. It informs you that the ant has + died. The ant cannot undertake any more actions from that point forward. + Read more + + Kind of Death + + + + Friendly ants can detect markers left by other ants. This method is + called when an ant smells a friendly marker for the first time. + Read more + + Marker + + + + This method is called as soon as an ant sees an apple within its + 360° visual range. The parameter is the piece of fruit that the + ant has spotted. + Read more + + spotted fruit + + + + This method is called as soon as an ant sees a mound of sugar in + its 360° visual range. The parameter is the mound of sugar that + the ant has spotted. + Read more + + spotted sugar + + + + Just as ants can see various types of food, they can also visually + detect other game elements. This method is called if the ant detects + an ant from an enemy colony. + Read more + + spotted ant + + + + Just as ants can see various types of food, they can also visually + detect other game elements. This method is called if the ant sees + a bug. + Read more + + spotted bug + + + + Just as ants can see various types of food, they can also visually + detect other game elements. This method is called if the ant sees an + ant from the same colony. + Read more + + spotted ant + + + + Just as ants can see various types of food, they can also visually + detect other game elements. This method is called if the ant detects + an ant from a friendly colony (an ant on the same team). + Read more + + spotted ant + + + + This method is called in every simulation round, regardless of additional + conditions. It is ideal for actions that must be executed but that are not + addressed by other methods. + Read more + + + + + If the ant has no assigned tasks, it waits for new tasks. This method + is called to inform you that it is waiting. + Read more + + + + + Enemy creatures may actively attack the ant. This method is called if an + enemy ant attacks. the ant can then decide how to react. + Read more + + attacking ant + + + + Enemy creatures may actively attack the ant. This method is called if a + bug attacks. the ant can decide how to react. + Read more + + attacking bug + + + + This method is called when an ant has travelled one third of its movement range. + Read more + + + + + If the ant’s destination is a piece of fruit, this method is called as soon + as the ant reaches its destination. It means that the ant is now near enough + to its destination/target to interact with it. + Read more + + reached fruit + + + + If the ant’s destination is a mound of sugar, this method is called as soon + as the ant has reached its destination. It means that the ant is now near + enough to its destination/target to interact with it. + Read more + + reached sugar + + + + The ant turns in the specified direction. The angle around which it + turns is determined automatically. + Read more + + direction + + + + The ant turns itself around the specified angle. Positive values turn + the ant to the right, negative values turn it to the left. + Read more + + degrees + + + + The ant turns 180 degrees in the opposite direction. Has the same effect + as TurnByDegrees(180). + Read more + + + + + The ant turns in the direction of the specified destination. + Read more + + item + + + + The ant stands still and forgets its current destination. In the next + round the result of Waiting() is called. + Read more + + + + + The ant moves forward. The ant’s destination remains unaltered. If a + value is specified, the ant will aim for its destination again as soon + as it has travelled the specified distance. + Read more + + + + + The ant moves forward. The ant’s destination remains unaltered. If a + value is specified, the ant will aim for its destination again as soon + as it has travelled the specified distance. + Read more + + steps + + + + The ant turns in the direction opposite the specified destination and + then walks straight ahead. The ant’s destination remains unaltered and + the walking distance can be specified. + Read more + + item + + + + The ant turns in the direction opposite the specified destination and + then walks straight ahead. The ant’s destination remains unaltered and + the walking distance can be specified. + Read more + + item + steps + + + + The ant saves the specified destination and walks to it. + Read more + + destination + + + + The ant saves the nearest anthill as its destination and walks towards it. + Read more + + + + + The ant saves the specified bug or the specified enemy ant as its + destination and walks toward it. When the ant arrives at its destination, + it begins to fight. + Read more + + target + + + + The ant picks up the specified food. In the case of a mound of sugar, + it takes as much as possible until it reaches its maximum load (see + CurrentLoad and MaximumLoad). In the case of a piece of fruit, the ant + begins carrying the fruit (see CarryingFruit). + Read more + + food + + + + The ant drops the food that it is currently carrying. Sugar is lost while + apples remain where they fall and can be picked up again later. The command + is not necessary when delivering food to an anthill—that occurs automatically. + Read more + + + + + The ant sprays a scent marker at the current location. The possible + parameters are data contained in the marker (these can be read out of the + result of Spots(Marker) via marker.Information) and how far the maker + spreads out. The farther the marker spreads out, the faster it will disappear. + Read more + + information + + + + The ant sprays a scent marker at the current location. The possible parameters + are data contained in the marker (these can be read out of the result of + Spots(Marker) via marker.Information) and how far the maker spreads out. + The farther the marker spreads out, the faster it will disappear. + Read more + + information + range + + + + This command causes the ant to display thought bubbles that can be used for + troubleshooting and debugging. + Read more + + message + + + + Evaluates if the specified fruit needs more ants to carry it. + Read more + + fruit + more ants required + + + + Returns the ant’s maximum energy. The unit is hit points. + Read more + + + + + Returns the ant’s maximum speed. The unit is steps per round. + Read more + + + + + Returns the maximum load that the ant can bear. The unit is food points. + This value determines how much sugar the ant can carry at once and how + fast it can carry an apple without the help of other ants. + Read more + + + + + Specifies the distance in steps that the ant can travel before it dies of + hunger. After the ant has travelled a third of the value, the event + GettingTired() is called and the value of IsTired is set to "true". (See WalkedRange). + Read more + + + + + Specifies the ant’s attack value. The attack value determines how + many hit points the ant deducts from an enemy in each round. The + unit is hit points. + Read more + + + + + Specifies the ant’s visual range in steps. This range determines how + far the ant must be from game elements like sugar in order for the ant + to see them. The direction that the ant is facing does not play a role + (ants have 360 vision in this game). + Read more + + + + + Specifies the speed with which an ant can turn. The unit is degrees per + round. + Read more + + + + + Returns the ant’s current energy. The unit is hit points. If an ant has 0 + hit points or fewer, it dies. This value is always less than or equal to + MaximumEnergy. + Read more + + + + + Returns the ant’s current possible speed. The unit is steps per round. The + value is influenced by the ant’s current load. Ants that are carrying a full + load can only travel at half of their maximum speed. The property always + returns a value greater than 0, even if the ant is standing still. This value + is always less than or equal to MaximumSpeed. + Read more + + + + + Returns the weight of the load that the ant is currently carrying. The unit + is food points. This value is always smaller than or equal to MaximumLoad. + Read more + + + + + Returns the number of friendly ants from the same colony in the ant’s 360° visual + range. The result of the calculation depends on the ant’s visual range. + Read more + + + + + Returns the number of friendly ants from the same colony and the same caste in + the ant’s 360° visual range. The result of this calculation depends on the ant’s + visual range. + Read more + + + + + Returns the number of friendly ants from the same team in the ant’s 360° visual + range. The result of this calculation depends on the ant’s visual range. + Read more + + + + + Returns the number of enemy ants in the ant’s 360° visual range. The result of + this calculation depends on the ant’s visual range. + Read more + + + + + Returns the number of bugs in the ant’s 360° visual range. The result of this + calculation depends on the ant’s visual range. + Read more + + + + + Returns the distance in steps to the nearest friendly anthill. + Read more + + + + + Returns the piece of fruit the ant is currently carrying. If the ant is not + carrying a piece of fruit, the value returned is null. + Read more + + + + + Returns the name of the ant's caste. + Read more + + + + + Returns the ant's current destination. If the ant currently has no + destination, the value returned is null. + Read more + + + + + Returns whether the ant is tired. The ant becomes tired as soon + as it has travelled a third of its maximum range. Once this value + has been exceeded, this property changes from false to true and + the event GettingTired() is called. + Read more + + + + + Returns how many steps forward the ant must go before it reaches + its destination. This value is reduced each round by CurrentSpeed. + Read more + + + + + Returns how many degrees the ant still has to turn before it moves + forward again. This value is reduced each round by RotationSpeed. + Read more + + + + + Returns the direction that the ant is facing on the map. + Read more + + + + + Returns whether the ant has reached its destination or not. + Read more + + + + + This property returns the total number of steps that the ant has + travelled since its last visit to an anthill. See Range. + Read more + + + + + Represents a bug + + + + + Attribute to descripe the different professions of ants + + + + + The Attackstrength + + + + + Hitpoints + + + + + Load + + + + + name + + + + + range + + + + + Rotationspeed + + + + + Spped + + + + + viewrange + + + + + Helper-class to calculate with distances and angles + + + + + Gives the distance between the to given objects + + object 1 + object 2 + Distance between + + + + Gives the distance between the to given objects + + object 1 + object 2 + Distance between + + + + Gives the distance between the to given objects + + object 1 + object 2 + Distance between + + + + Gives the distance between the to given objects + + object 1 + object 2 + Distance between + + + + Gives the direction from object 1 to object 2 + + object 1 + object 2 + direction + + + + Gives the direction from object 1 to object 2 + + object 1 + object 2 + direction + + + + Gives the direction from object 1 to object 2 + + object 1 + object 2 + direction + + + + Gives the direction from object 1 to object 2 + + object 1 + object 2 + direction + + + + Represents the Colony + + + + + Delivers the Name of that colony + + + + + Attribute to request access to database. + + + + + Attribute to request fileaccess. + + + + + Its the interface for all kind of food + + + + + Returns the amount of food + + + + + Delivers the unique Id of this food + + + + + Represents Fruit + + + + + List of possible kinds of death + + + + + The ant was running out of food + + + + + The ant was eaten up by a bug + + + + + The ant was killed by a foreign ant + + + + + Represents a marker + + + + + Gives the information saved in that mark + + + + + Delivers the unique ID of this marker + + + + + Namespace Doc für English + + + + + Attribute to request access to network. + + + + + Attribute to descripe an ant + + + + + First name of the player + + + + + Name of the colony + + + + + Last name of the player + + + + + Helper-class to generate some random numbers + + + + + Gives a random number between 0 and the given maximum + + maximum + random number + + + + Gives a random number between the given minimum and the given maximum + + minimum + maximum + random number + + + + Represents a sugarhill + + + + + Attribute to request access to the userinterface. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Standard. + + + + + Looks up a localized string similar to Attempt to cheat with a fake Framework assembly.. + + + + + Looks up a localized string similar to External reference:. + + + + + Looks up a localized string similar to This ant was likely created with a newer version of AntMe!.. + + + + + Looks up a localized string similar to The file does not contain a class with this name.. + + + + + Looks up a localized string similar to The ant class that was found ({0}) is not decorated with a PlayerAttribute.. + + + + + Looks up a localized string similar to Ants of version 1.1 or lower are not supported in this version anymore.. + + + + + Looks up a localized string similar to Attempting to load an earlier ant simulation core (version: {0}) failed.. + + + + + Looks up a localized string similar to The ant class {0} containas more than one PlayerAttribute.. + + + + + Looks up a localized string similar to The external reference '{0}' could not be loaded.. + + + + + Looks up a localized string similar to The ant could not be assigned a version. {0}. + + + + + Looks up a localized string similar to The attack-modificator of caste {0} of ant {1} is invalid.. + + + + + Looks up a localized string similar to The energy-modificator of caste {0} of ant {1} is invalid.. + + + + + Looks up a localized string similar to The load-modificator of caste {0} of ant {1} is invalid.. + + + + + Looks up a localized string similar to The caste-attribute of ant {0} does not contain a name.. + + + + + Looks up a localized string similar to The reach-modificator of caste {0} of ant {1} is invalid.. + + + + + Looks up a localized string similar to The rotationspeed-modificator of caste {0} of ant {1}is invalid.. + + + + + Looks up a localized string similar to The speed-modificator of caste {0} of ant {1} is invalid.. + + + + + Looks up a localized string similar to The sum of modificators of caste {0} of player {1} are invalid.. + + + + + Looks up a localized string similar to The viewrange-modificator of caste {0} of ant {1} is invalid.. + + + + + Looks up a localized string similar to The desired caste for the new ant '{0}' doesn't exist.. + + + + + Looks up a localized string similar to The loop count cannot be greater than {0}.. + + + + + Looks up a localized string similar to The minimum loop count is 1.. + + + + + Looks up a localized string similar to The timeout value for a loop cannot be less than 1.. + + + + + Looks up a localized string similar to At least one team must be selected for the simulation.. + + + + + Looks up a localized string similar to The round count must not exceed {0}.. + + + + + Looks up a localized string similar to The minimum round count is 1.. + + + + + Looks up a localized string similar to The timeout value for a round cannot be less than 1.. + + + + + Looks up a localized string similar to The parameter configuration must not be null.. + + + + + Looks up a localized string similar to The environment has not yet been initialized.. + + + + + Looks up a localized string similar to The timeout for a round has been exceeded.. + + + + + Looks up a localized string similar to The configuration may only contain PlayerInfoFileName or PlayerInfoFileDump.. + + + + + Looks up a localized string similar to It's not possible to create marker with size smaller than 0. + + + + + Looks up a localized string similar to The PlayerAttribute of class {0} does not contain a name.. + + + + + Looks up a localized string similar to The simulation has already been unloaded.. + + + + + Looks up a localized string similar to The configuration may only contain PlayerInfoFileName or PlayerInfoFileDump.. + + + + + Looks up a localized string similar to There are no rights to grand database-access to various colonies.. + + + + + Looks up a localized string similar to There are no rights to grand file-access to various colonies.. + + + + + Looks up a localized string similar to There are no rights to grand network-access to various colonies.. + + + + + Looks up a localized string similar to There are no rights to grand userinterface-access to various colonies.. + + + + + Looks up a localized string similar to The index of the caste column is too large.. + + + + + Looks up a localized string similar to The index of the caste column is too small.. + + + + + Looks up a localized string similar to Cannot call Step() on a simulation that has already completed.. + + + + + Looks up a localized string similar to The list of players of a team may not be empty.. + + + + + Exception for implementation-Problems in player-ai-files. + + + + + KOnstruktor der Regelverletzung ohne weitere Angaben + + + + + Konsruktor der Regelverletzung mit der Übergabe einer Beschreibung zur Verletzung + + Beschreibung der Regelverletzung + + + + Konstruktor zur Regelverletung mit übergabe einer Nachricht sowie einer verursachenden Exception + + Beschreibung zum Problem + Verursachende Exception + + + + Konstruktor für die Serialisierung dieser Exception + + + + + + + Holds the caste-information. + + + + + Der Angriffmodifikator der Kaste. + + + + + Der Drehgeschwindigkeitmodifikator der Kaste. + + + + + Der Energiemodifikator der Kaste. + + + + + Der Geschwindigkeitmodifikator der Kaste. + + + + + Der Lastmodifikator der Kaste. + + + + + Der Name der Kaste. + + + + + Der Reichweitenmodifikator der Kaste. + + + + + Der Sichtweitenmodifikator der Kaste. + + + + + Prüft, ob diese Ameisenkaste den Regeln entspricht + + RuleViolationException + + + + Gibt an, ob es sich bei dieser Ameisenkaste um die Standard-Kaste handelt + + Standardwert + + + + Erzeugt ein CasteState-Objekt. + + + + + + Host-Class for Ai-Analysis to host the analyze-core inside application-domains. + + + + + Type of baseAnt from core. + + + + + Holds all thrown exceptions. + + + + + List of all Ant-BaseClasses in every known language. + + + + + Sets special simulation-settings. + + special settings + + + + Searches in the given file for possible PlayerInfos and delivers a list of found Players. + + Ai-File as binary file-dump. + True, if Analyzer should also check player-rules + List of found players. + + + + Analyzes the given for any kind of valid player-information. + + given assembly. + true, if the Analyser should also check player-rules + List of valid players. + + + + List of thrown Exceptions.s + + + + + Ein Bau eines Ameisenvolkes. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Die Id die den Bau während eines Spiels eindeutig identifiziert. + + + + + Erzeugt eine neue Instanz der Bau-Klasse. + X-Koordinate + Y.Koordinate + Radius + Volk ID + + + + + Erzeugt ein BauZustand-Objekt mit den aktuellen Daten des Bau. + + + + + Die Position des Bau auf dem Spielfeld. + + + + + Implementiert ein Zellrasterverfahren zum schnellen Auffinden von + Spielelementen auf dem Spielfeld. + + + Ein Spielelement wird unabhängig von seinem Radius in genau eine Zelle + einsortiert. Spielelemente "zwei Zellen weiter" werden daher auch dann + nicht gefunden, wenn sie (durch ihren Radius) eigentlich nahe genug + am Referenzelement liegen. + + Typ der Spielelemente. + Wolfgang Gallo (wolfgang@antme.net) + + + + Erzeugt ein Gitter mit den angegebenen Maßen oder gibt ein vorhandenes + Gitter mit diesem Maßen zurück. + + Breite des Gitters. + Höhe des Gitters. + Seitenlänge einer Gitterzelle. Bestimmt die + maximale Entfernung bis zu der ein Spielelement ein anderes sehen kann. + + + + Erzeugt eine neue Instanz der Klasse. + + Die Maße des Gitters. + + + + Erzeugt einen neue Instanz der Klasse. + + Breite des Gitters. + Höhe des Gitters. + Seitenlänge einer Gitterzelle. Bestimmt die + maximale Entfernung bis zu der ein Spielelement ein anderes sehen kann. + + + + Fügt dem Gitter mehrere Spielelemente hinzu. + + Eine Liste von Spielelementen. + + + + Entfernt mehrere Elemente aus dem Gitter. + + Eine Liste von Spielelementen. + + + + Findet alle Spielelemente innerhalb des gegebenen Sichtkreis des gegebenen Spielelements. + + Das Referenzspielelement. + Die maximale Entfernung. + Eine nach Entfernung sortierte Liste von Spielelementen. + + + + Findet alle Spielelemente innerhalb des Sichtkreis der gegebenen Wanze. + + + Die Simulation legt ein Gitter mit der maximalen Sichtweite der Wanzen als + Seitenlänge an und benutzt diese Methode auf dieser Instanz zum Finden von + Ameisen. In dieses Gitter werden nur Ameisen einsortiert. + + Die Referenzwanze. + Eine Liste von Ameisen. + + + + Findet die Markierung, die die gegebene Ameise noch nicht gerochen hat + und die der Ameise am nächsten liegt. + + + Die Simulation legt ein Gitter mit dem maximalen Radius einer Markierung als + Seitenlänge an und benutzt diese Methode auf dieser Instanz zum Finden von + Markierungen. In dieses Gitter werden nur Markierungen einsortiert. + + Die Referenzameise. + Eine Markierung. + + + + Findet die Wanze, die feindliche Ameise und die befreundete Ameise mit der + geringsten Entfernung innerhalb des Sichtkreis der gegebenen Ameise und + zählt die Anzahl an Wanzen, feindlichen und befreundeten Ameisen im Sichtkreis. + + + Wird für Ameisen verwendet. Die Simulation legt für jeden vorkommenden Sichtradius + eine eigenes Gitter an und benutzt diese Methode auf der passenden Instanz zum Finden + von Insekten. Die Seitenlänge dieses Gitters ist also der Sichradius der Ameise. + In diese Gitter werden Wanzen und Ameisen einsortiert. + + Die Referenzameise. + Eine Wanze. + Die Anzahl an Wanzen. + Eine feindliche Ameise. + Die Anzahl an feindlichen Ameisen. + Eine befreundete Ameise. + Die Anzahl an befreundeten Ameisen. + Die Anzahl an befreundeten Ameisen der selben Kaste. + + + + Speichert die Abmessungen eines Gitters. + + + + + Die Breite des Gitters. + + + + + Die Höhe des Gitters. + + + + + Die Seitenlänge einer Gitterzelle. + + + + + Erzeugt eine neue Instanz der Struktur. + + Die Breite des Gitters. + Die Höhe des Gitters. + Die Seitenlänge einer Gitterzelle. + + + + Represents fruit. + + + + + Die abstrakte Basisklasse für Nahrung. + + + + + Die Id die die Nahrung während eines Spiels eindeutig identifiziert. + + + + + Die Position der Nahrung auf dem Spielfeld. + + + + + Die verbleibende Menge an Nahrungspunkten. + + + + + Der abstrakte Nahrung-Basiskonstruktor. + + Die X-Position der Koordinate auf dem Spielfeld. + Die Y-Position der Koordinate auf dem Spielfeld. + Die Anzahl der Nahrungspunkte. + + + + Die verbleibende Menge an Nahrungspunkten. + + + + + Die Position der Nahrung auf dem Spielfeld. + + + + + Liste der tragenden Ameisen. + + + + + Erzeugt eine neue Instanz der Obst-Klasse. + + Die X-Position des Obststücks auf dem Spielfeld. + Die Y-Position des Obststücks auf dem Spielfeld. + Die Anzahl an Nahrungspunkten. + + + + Bestimmt, ob das Stück Obst für das angegebene Volk noch tragende + Insekten benötigt, um die maximale Geschwindigkeit beim Tragen zu + erreichen. + + Das Volk. + + + + Erzeugt ein ObstZustand-Objekt mit dem Daten Zustand des Obststücks. + + + + + Die verbleibende Menge an Nahrungspunkten. + + + + + Beschreibt wie eine Ameise gestorben ist. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Gibt an, dass die Ameise verhungert ist. + + + + + Gibt an, dass die Ameise von einer Wanze gefressen wurde. + + + + + Gibt an, dass die Ameise von einer feindlichen Ameise besiegt wurde. + + + + + Represents a sugar-Hill. + + + + + Creates an instance of CoreSugar. + + The x-position of sugar on playground. + The y-position of sugar on playground. + The amount of food. + + + + Creates a sugar-state of this sugar-hill. + + current state of that sugar-hill. + + + + Klasse zur Weiterleitung von Debug-Information mit Kontextinformationen + + + + + Konstruktor einer Debugnachricht + + ID des spielers + ID der Ameise + Nachricht + + + + Zeitpunkt der Nachricht + + + + + Assoziierter Spieler + + + + + ID der betroffenen Ameise + + + + + Die Debugnachricht + + + + + List of possible areas + + + + + Event-Arguments for a AreaChange-Event + + + + + Creates a new AreaChangeEventArgs to unknown area. + + + + + Creates a new AreaChangeEventArgs to given area and player. + + player + area + + + + Gets the player. + + + + + Gets the area. + + + + + Delegate for area-changes. + + sending simulation-environment + arguments for event + + + + Namespace Doc für Simulation + + + + + Wird bei einer Regelverletzung der AntMe-Spielregeln geworfen + + + + + KOnstruktor der Regelverletzung ohne weitere Angaben + + + + + Konsruktor der Regelverletzung mit der Übergabe einer Beschreibung zur Verletzung + + Beschreibung der Regelverletzung + + + + Konstruktor zur Regelverletung mit übergabe einer Nachricht sowie einer verursachenden Exception + + Beschreibung zum Problem + Verursachende Exception + + + + Konstruktor für die Serialisierung dieser Exception + + + + + + + Class, to extract PlayerInfos from given Ai-Assembly. + + Tom Wendel (tom@antme.net) + + + + Analyzes a Ai-File based on filename. + + Ai-File to analyze. + List of found PlayerInfos + + + + + + + + + + + + + + + + Analyzes a Ai-File based on filename. + + Ai-File to analyze. + True, if Analyser should also check player-rules. + List of found PlayerInfos + + + + + + + + + + + + + + + + Analyzes a Ai-File based on binary file-dump. + + Ai-File to analyze. + List of found PlayerInfos + + + + + + + + + Analyzes a Ai-File based on binary file-dump. + + Ai-File to analyze. + True, if Analyser should also check player-rules. + List of found PlayerInfos + + + + + + + + + Find a specific Player-information in given Ai-File. + + File as binary file-dump + Class-name of Ai + the right + + + + + Find a specific in given Ai-File. + + File as filename + Class-name of Ai + the right or null for no hits + + + + Die Position eines Objekts auf dem Spielfeld. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Erzeugt eine neue Instanz der Koordinate-Struktur. + + Der X-Wert des Elementes. + Der Y-Wert des Elementes. + Der Radius des Elementes. + Die Richtung in die das Element blickt. + + + + Erzeugt eine neue Instanz der Koordinate-Struktur. + + Der X-Wert des Elementes. + Der Y-Wert des Elementes. + Der Radius des Elementes. + + + + Erzeugt eine neue Instanz der Koordinate-Struktur. + + Der X-Wert des Elementes. + Der Y-Wert des Elementes. + + + + Erzeugt eine neue Instanz der Koordinate-Struktur ausgehend von einer + bestehenden Koordinate. + + Die bestehende Koordinate. + Der X-Wert relativ zu der Koordinate. + Der Y-Wert relativ zu der Koordinate. + + + + Bestimmt die Entfernung zweier Objekte auf dem Spielfeld in Schritten. + + Objekt 1. + Objekt 2. + Die Entfernung. + + + + Bestimmt die Richtung von einem Objekt auf dem Spielfeld zu einem + anderen. + + Das Start Objekt. + Das Ziel Objekt. + Die Richtung. + + + + Bestimmt die Entfernung zweier Koordinaten auf dem Spielfeld in der + internen Einheit. + + Koordinate 1. + Koordinate 2. + Die Entfernung. + + + + Bestimmt die Entfernung zweier Koordinaten auf dem Spielfeld in der + internen Einheit ohne Beachtung der Radien. + + Koordinate 1. + Koordinate 2. + Die Entfernung. + + + + Bestimmt die Richtung von einer Koordinate auf dem Spielfeld zu einer + anderen. + + Die Start Koordinate. + Die Ziel Koordinate. + Die Richtung. + + + + Der X-Wert des Elements. + + + + + Der Y-Wert des Elements. + + + + + Der Radius des Elementes. Da alle Berechnungen in der Spiel (z.B. + die Bestimmung von Entfernungen) auf Punkten und Kreisen basiert, wird + auch der Radius eines Objektes in der IKoordinate Struktur gespeichert. + + + + + Die Richtung in die das Element blickt. Eine Richtung ist zwar kein + echter Teil einer Koordinate und nicht alle Elemente die eine Koordinate + haben benötigen die Richtung, aber die IKoordinate-Struktur ist der + beste Platz um auch die Richtung eines Objektes zu speichern. + + + + + Eine Duft-Markierung die eine Information enthält. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Die Id die die Markierung während eines Spiels eindeutig identifiziert. + + + + + Erzeugt eine neue Instanz der Markierung-Klasse. + + Die Koordinate der Markierung. + Die Ausbreitung der Markierung in Schritten. + + ID des Volkes + + + + Erhöht das Alter der Markierung und passt ihren Radius an. + + + + + Erzeugt ein MarkierungZustand-Objekt mit den aktuellen Daten der + Markierung. + + + + + Die gespeicherte Information. + + + + + Bestimmt ob die Markierung ihre maximales Alter noch nicht überschritten + hat. + + + + + Die Position der Markierung auf dem Spielfeld. + + + + + List of possible versions of simulation. + + + + + Version 1.1 - Singleplayer-Variante + + + + + Version 1.5 - war nur als Beta verfügbar und stellt die erste Multiplayer-Variante dar + + + + + Version 1.6 - die Basis für die erste Online-Version + + + + + fx 4.0 Port of Version 1.6 + + + + + Version 2.0 - Bisher nicht vorhanden + + + + + Holds the set of caste-Settings. + + + + + Offset to shift the array-index. + + + + + Sum of all points. + + + + + List of caste-setting-columns. + + + + + Checks the value-ranges of all properties. + + + + + Gives the lowest Column-Index. + + + + + Gives the highest Column-Index. + + + + + Delivers the right caste-column. + + index of column + caste-Column + + + + Holds a set of caste-Settings in one column. + + + + + Minimum attack-value + + + + + Maximum attack-value + + + + + Minimum rotationspeed + + + + + Maximum rotationspeed + + + + + Minimum rotationspeed + + + + + Maximum rotationspeed + + + + + Minimum rotationspeed + + + + + Maximum rotationspeed + + + + + Minimum load + + + + + Maximum load + + + + + Minimum range + + + + + Maximum range + + + + + Minimum viewrange + + + + + Maximum viewrange + + + + + Attack-Value (Hit-points per Round) + + + + + Rotation-speed (Degrees per Round) + + + + + Hit-points-Value (Total points) + + + + + Speed-Value (Steps per Round) + + + + + Load-Value (total food-load) + + + + + Range-Value (total count of steps per life) + + + + + View-range-Value (range in steps) + + + + + Checks, if values are valid + + + + + Simulation-Settings from application-configuration. + + + + + Sets or gets the name of this settings-set. + + + + + Gets or sets Guid of that settings-set. + + + + + Gets the size of the playground in SquareAntSteps. + + + + + Gets the multiplier of additional playground-size per player. + + + + + Gets the radius of anthills. + + + + + Minimum Battle-Distance in steps between two insects. + + + + + Gets the maximum count of ants simultaneous on playground. + + + + + Gets the maximum count of bugs simultaneous on playground. + + + + + Gets the maximum count of sugar simultaneous on playground. + + + + + Gets the maximum count of fruit simultaneous on playground. + + + + + Gets the multiplier for maximum count of bugs simultaneous on playground per player. + + + + + Gets the multiplier for maximum count of sugar simultaneous on playground per player. + + + + + Gets the multiplier for maximum count of fruit simultaneous on playground per player. + + + + + Gets the multiplier for maximum count of ants simultaneous on playground per player. + + + + + Gets the maximum count of ants in the whole simulation. + + + + + Gets the maximum count of bugs in the whole simulation. + + + + + Gets the maximum count of sugar in the whole simulation. + + + + + Gets the maximum count of fruit in the whole simulation. + + + + + Gets the multiplier for maximum count of ants per player in the whole simulation. + + + + + Gets the multiplier for maximum count of bugs per player in the whole simulation. + + + + + Gets the multiplier for maximum count of sugar per player in the whole simulation. + + + + + Gets the multiplier for maximum count of fruit per player in the whole simulation. + + + + + Gets the delay for ant before next respawn in rounds. + + + + + Gets the delay for bugs before next respawn in rounds. + + + + + Gets the delay for sugar before next respawn in rounds. + + + + + Gets the delay for fruits before next respawn in rounds. + + + + + Gets the attack-value of bugs. + + + + + Gets the rotation speed of bugs. + + + + + Gets the energy of bugs. + + + + + Gets the speed of bugs. + + + + + Gets the attack-range of bugs. + + + + + Gets the regeneration-value of bugs. + + + + + Gets the delay in rounds between the regeneration-steps of bugs. + + + + + Gets the minimal amount of food in sugar-hills. + + + + + Gets the maximum amount of food in sugar-hills. + + + + + Gets the minimal amount of food in fruits. + + + + + Gets the maximum amount of food in fruits. + + + + + Gets the multiplier for fruits between load and amount of food. + + + + + Gets the multiplier for fruits between radius and amount of food. + + + + + Gets the minimal size of a marker. + + + + + Gets the minimal allowed distance between to marker. + + + + + Gets the maximum age in rounds of a marker. + + + + + Multiplier for the calculation from food to points. + + + + + Gets the amount of points for collected fruits. + + + + + Gets the amount of points for killed bugs. + + + + + Gets the amount of points for killed foreign ants. + + + + + Gets the amount of points for own dead ants killed by bugs. + + + + + Gets the amount of points for own dead ants killed by foreign ants. + + + + + Gets the amount of points for own dead starved ants. + + + + + Gives the caste-Settings. + + + + + Sets a custom set of settings. + + custom settings + + + + Resets the values to the default settings. + + + + + Checks the value-ranges of all properties. + + + + + Saves the settings to a setting-file. + + settings to save + filename of target file + + + + Loads settings from a setting-file. + + filename of target file + Loaded settings + + + + Gives the name of the settings. + + Name of Settings + + + + Checks, if two different simulation-sets are equal. + + + + + + + Generates a Hash-Code for that object. + + Hash-Code + + + + Gets the default settings. + + + + + Gives the current simulation-settings + + + + + Gets the maximal Speed of an insect. + + + + + Gets the maximal size of a marker. + + + + + Gets the maximal size of a marker (without radius) + + + + + Represents a complete encapsulated simulation-core. + + Tom Wendel (tom@antme.net) + + + + Creates an Instance of simulator. Should be called only from factory. + + configuration + + + + Calculates the next step and deliver through parameter. + + empty + + + + Disposes open resources. + + + + + Disposes open resources. + + + + + Unloads simulator. + + + + + Gets the current simulator-state. + + + + + Gets the current round of simulation. + + + + + Gets the current loop of simulation. + + + + + Gets the number of ticks the last round was running. + + + + + Gets the total number of ticks the current Loop is running. + + + + + Gets the total number of ticks the current simulator is working. + + + + + Gets a the total time of ticks a player needed in the last round. + + + + + Gets the total number of ticks a player needed in the whole loop till now. + + + + + Class, to host an simulation-Environment inside an . + + + + + Initialize the simulation-environment. + + configuration + + + + Executes one single step in simulation and returns hostState. + + Summery of the executed simulationStep + + + + Internal step-Method to calculate the next step + + + + + Gets the last thrown exception. + + + + + Statusklasse zur Weitergabe des aktuellen Spielstandes aus dem Host zurück zum Simulator + + Tom Wendel (tom@antme.net) + + + + Klasse zur Haltung aller relevanten Konfigurationsdaten einer Simulation. + + + + + Maximum count of players per Simulation. + + + + + Minimum count of rounds for a valid simulation. + + + + + Maximum count of rounds for a valid simulation. + + + + + Minimum count of loops for a valid simulation. + + + + + + Maximum count of loops for a valid simulation. + + + + + Minimum value for round-timeouts. + + + + + Minimum value for loop-timeouts. + + + + + Timeout-Handling + + + + + Initialisiert eine leere Spielerliste + + + + + Initialsiert mit den übergebenen Werten + + Anzahl Durchläufe + Anzahl Runden + Teamliste + + + + Ermittelt, ob die Angaben der Konfiguration simulationsfähig sind + + Regelkonformer Konfigurationsinhalt + + + + Erstellt eine Kopie der Konfiguration + + Kopie der aktuellen Konfiguration + + + + Gibt die Anzahl der Runden insgesamt an, die in der Simulation durchlaufen werden sollen oder legt diese fest. + + + + + Gibt die Anzahl Durchläufe insgesamt an, die in der Simulation durchlaufen werden sollen oder legt diese fest. + + + + + Legt fest, ob die Simulation zu debugzwecken Timeouts ignorieren soll. + + + + + Legt die Timeout-Zeit von Runden in ms fest + + + + + Legt die Timeout-Zeit von Durchläufen in ms fest + + + + + Liefert die Liste der Mitspieler in dieser Simulation. + + + + + Legt fest, ob es den Spielern erlaubt ist auf das Userinterface zuzugreifen + + + + + Legt fest, ob es den Spielern erlaubt ist auf das Dateisystem zuzugreifen + + + + + Legt fest, ob es den Spielern erlaubt ist auf fremde Bibliotheken zuzugreifen + + + + + Legt fest, ob es den Spielern erlaubt ist Datenbankverbindungen zu öffnen + + + + + Legt fest, ob es den Spielern erlaubt ist eine Netzwerkverbindung zu öffnen + + + + + Gibt an, ob die Simulation Debuginformationen ausgeben soll + + + + + Gibt einen Startwert für die Initialisierung des Zufallsgenerators an. Durch einen gleichen + Startwert werden gleiche Startbedingungen garantiert. + + + + + Gets or sets the simulation-settings for this simulation. + + + + + Proxy-Class to host an AppDomain für the encapsulated simulation. + + Tom Wendel (tom@antme.net) + + + + Appdomain to host the simulation in. + + + + + Proxy for the simulationHost inside the appDomain. + + + + + Initialisierung der Simulation + + Simulationskonfiguration + + + + Executes one single step in simulation and returns hostState. + + The prefilled simulationState to put the currrent simulation-Snapshot in. + Summery of the executed simulationStep. + + + + Unloads the appdomain, if needed and reset the proxy. + + + + + Liste der möglichen Stati eines Simulators + + + + + Der Simulator ist initialisiert, aber noch nicht gestartet worden + + + + + Der Simulator simuliert gerade + + + + + Die Simulation wurde beendet + + + + + Static Class to encapsulate player-calls to his ant. + + + + + Creates a static instance of PlayerCall + + + + + Perform call to "Waits()" on given ant. + + ant + + + + Perform call to "BecomesTired()" on given ant. + + ant + + + + Perform call to "Spots(Sugar)" on given ant. + + ant + sugar + + + + Perform call to "Spots(Fruit)" on given ant. + + ant + fruit + + + + Perform call to "TargetReached(Sugar)" on given ant. + + ant + sugar + + + + Perform call to "TargetReached(Fruit)" on given ant. + + ant + fruit + + + + Perform call to "SmellsFriend()" on given ant. + + ant + marker + + + + Perform call to "SpotsFriend()" on given ant. + + ant + friendly ant + + + + Perform call to "SpotsTeamMember()" on given ant. + + ant + friendly ant + + + + Perform call to "Spots(Bug)" on given ant. + + ant + bug + + + + Perform call to "Spots(Ant)" on given ant. + + ant + foreign ant + + + + Perform call to "UnderAttack(Ant)" on given ant. + + ant + enemy + + + + Perform call to "UnderAttack(Bug)" on given ant. + + ant + bug + + + + Perform call to "HasDied()" on given ant. + + ant + kind of death + + + + Perform call to "Tick()" on given ant. + + ant + + + + Holds all meta-information about a player. + + + + + List of all castes. + + + + + Reference to the ai-assembly-file. + + + + + true, if the Ai gives some debug-information. + + + + + Guid of player. + + + + + Name of colony. + + + + + Complete Class-name of colony-class. + + + + + true, if the colony needs access to a database. + + + + + true, if the colony needs access to files. + + + + + true, if the colony needs access to the network. + + + + + Additional information about access-requests. + + + + + true, if the colony has references to other assemblies. + + + + + true, if the colony needs access to user-interfaces. + + + + + Last name of colony-author. + + + + + First name of colony-author. + + + + + Language of colony. + + + + + true, if the colony uses any static types. + + + + + Simulator-Version of this colony. + + + + + Creates a new instance of PlayerInfo. + + + + + Creates a new instance of PlayerInfo. + + Base-info + + + + Creates a new instance of PlayerInfo. + + Guid of colony + Name of colony + Last name of author + First name of author + Class-name of colony + Colony uses static types + Version of simulator of this colony + Language of this colony + List of castes + Colony produces debug-information + Needs access to user-interfaces + Needs access to databases + Needs access to files + Needs access to network + Needs references to other assemblies + Additional information about security-requests + + + + Checks the rules. + + + + + + Clones the whole object + + clone + + + + Delivers the list of castes. + + + + + SpielerInfo Klasse mit der angabe eines zusätzlichen Dumps einer Spieler-KI + + + + + Kopie der KI-Assembly + + + + + Creates an instance of PlayerInfoFiledump + + + + + Konstruktor der SpielerInfo mit Dateikopie + Kopie der Datei in Form eines Byte[] + + + + + Konstruktor der SpielerInfo mit Dateikopie + + Basis SpielerInfo + Kopie der Datei in Form eines Byte[] + + + + Spielerinfo mit zusätzlicher Angabe eines Dateinamens + + + + + Pfad zur KI-Datei + + + + + Creates an instance of PlayerInfoFilename + + + + + Konstruktor der SpielerInfo mit Dateinamen + + + + + Konstruktor der SpielerInfo mit Dateinamen + + + + + + + Ermittelt, ob die KIs gleich sind + + + + + + + Erzeugt einen Hash aus den gegebenen Daten + + Hashcode + + + + List of possible player-languages. + + + + + Unknown language + + + + + German + + + + + English + + + + + Speichert die Statistik eines Spielers. + + + + + Die aktuelle Anzahl an Ameisen. + + + + + Die Anzahl der durch eigene Ameisen besiegten feindlichen Ameisen. + + + + + Die Anzahl der besiegten Wanzen. + + + + + Die Anzahl der gesammelten Nahrungspunkte. + + + + + Anzahl gesammeltem Obst. + + + + + Die Anzahl der verhungerten Ameisen. + + + + + Die Anzahl der von feindlichen Ameisen besiegten eigenen Ameisen. + + + + + Die Anzahl der von Wanzen gefressenen Ameisen. + + + + + Zählt zwei Statistiken zusammen. + + Statistik 1. + Statistik 2. + Statistik 1 + Statistik 2. + + + + Gibt die Gesamtpunktzahl zurück. + + + + + Das Spielfeld. + + Wolfgang Gallo (gallo@antme.net) + + + + Erzeugt eine neue Instanz der Spielfeld-Klasse. + + Die Breite in Schritten. + Die Höhe in Schritten. + Initialwert für Zufallsgenerator + + + + Erzeugt einen neuen Zuckerhaufen. + + + + + Erzeugt ein neues Obsttück. + + + + + Erzeugt einen neuen Bau. + + Id of colony + Der neue Bau. + + + + Der Radius. + + + + + Die X-Koordinate. + + + + + Die Y-Koordinate. + + + + + Erzeugt eine neue Instant der Punkt-Struktur. + + Die X-Koordinate. + Die Y-Koordinate. + Der Radius. + + + + Erzeugt eine neue Instant der Punkt-Struktur aus einer Koordinate. + + Die Koordinate. + + + + Holds all simulation-elements. + + + + + Creates a new instance of SimulationEnvironment + + + + + Weitergabe des Verantwortungswechsels + + + + + + + Initialisiert die Simulation um mit Runde 1 zu beginnen + + Konfiguration der Simulation + + + + + + + + + + + + + + + + + Berechnet einen neuen Spielschritt + + Zustandskopie des Simulationsstandes nachdem der Schritt ausgeführt wurde + RuleViolationException + Exception + + + + Erzeugt einen Zustand aus dem aktuellen Spielumstand + + aktueller Spielstand + + + + Holds the current playground. + + + + + Holds a list of active teams. + + + + + Holds the "colony" of bugs. + + + + + Holds the calculated sin- and cos-values. + + + + + Holds the calculated sin- and cos-values. + + + + + Calculates all possible angles. + + + + + Delay-counter for sugar-respawn. + + + + + Counts down the total number of allowed sugar-hills. + + + + + Gets the count of simultaneous existing sugar-hills. + + + + + Removes all empty sugar-hills from list. + + + + + Spawns new sugar, if its time. + + + + + Delay-counter for fruit-respawn. + + + + + Counts down the total number of allowed fruits. + + + + + Gets the count of simultaneous existing fruits. + + + + + Spawns new fruit, if its time. + + + + + Removes fruit from list. + + winning colony + + + + Gets the count of simultaneous existing ants. + + + + + Prüft ob eine Ameise an ihrem Ziel angekommen ist. + + betroffene Ameise + + + + Prüft ob eine Ameise einen Zuckerhaufen sieht. + + betroffene Ameise + + + + Prüft ob eine Ameise ein Obsstück sieht. + + betroffene Ameise + + + + Prüft ob die Ameise eine Markierung bemerkt. + + betroffene Ameise + + + + Erntfernt Ameisen die keine Energie mehr haben. + + betroffenes Volk + + + + Erzeugt neue Ameisen. + + betroffenes Volk + + + + Entfernt abgelaufene Markierungen und erzeugt neue Markierungen. + + betroffenes Volk + + + + Gets the count of simultaneous existing bugs. + + + + + Remove dead bugs. + + + + + Heals the bugs, if its time. + + + + + Spawn new bugs, if needed. + + + + + Repräsentiert ein Team innerhalb der Simulationskonfiguration + + + + + Guid des Teams + + + + + Name des Teams + + + + + Liste der enthaltenen Spieler + + + + + Konstruktor des Teams + + + + + Konstruktor des Teams + + Liste der Spieler + + + + Konstruktor des Teams + + Guid des Teams + Liste der Spieler + + + + Konstruktor des Teams + + Name des Teams + Liste der Spieler + + + + Konstruktor des Teams + + Guid des Teams + Name des Teams + Liste der Spieler + + + + Prüft, ob das Team regelkonform aufgebaut ist + + + + + Erstellt eine Kopie des Teams + + Kopie des Teams + + + + Liste der spieler dieses Teams + + + + + Ein Ameisenvolk. Kapselt alle Informationen die zur Laufzeit eines Spiels + zu einem Spieler anfallen. + + Wolfgang Gallo (wolfgang@antme.net) + + + + Die Id die das Volk während eines laufenden Spiels idenzifiziert. + + + + + Die Guid, die das Volk eindeutig identifiziert. + + + + + Der Spieler der das Verhalten des Volkes steuert. + + + + + Zählt die Anzahl an Runden herunter, bis wieder eine neus Insekt erzeugt + werden kann. + + + + + Die Angriffswerte aller Kasten des Volkes. + + + + + Gitter für die verschiedenen Sichtweiten. + + + + + Die Drehgeschwindigkeiten aller Kasten des Volkes in Grad pro Runde. + + + + + Die Lebenspunkte aller Kasten des Volkes. + + + + + Die Geschwindigkeiten aller Kasten des Volkes in der internen Einheit. + + + + + Die maximalen Lastwerte aller Kasten des Volkes. + + + + + Die Reichweiten aller Kasten des Volkes in der internen Einheit. + + + + + Die Sichtweiten aller Kasten des Volkes in der internen Einheit. + + + + + Erzeugt eine neue Instanz der Volk-Klasse. Erzeugt ein Wanzen-Volk. + + Das Spielfeld. + + + + Erzeugt eine neue Instanz der Volk-Klasse. Erzeugt ein Ameisen-Volk. + + Das Spielfeld. + Das Spieler zu dem das Volk gehört. + Das dazugehörige Team. + + + + Erstellt eine neues Insekt. + + + + + Entfernt ein Insekt. + + Insekt + + + + Erzeugt ein VolkZustand Objekt mit dem aktuellen Zustand des Volkes. + + + + + + Die Anzahl von Insektenkasten in diesem Volk. + + + + + Eine Wanze + + Wolfgang Gallo (wolfgang@antme.net) + + + + Gibt an, ob die Wanze sich in der aktuellen Runde noch bewegen kann. + + + + + Erzeugt ein BugState-Objekt mit dem aktuellen Daten der Wanzen. + + + + + diff --git a/BrainArmyAnts/bin/de/AntMe.SharedComponents.resources.dll b/BrainArmyAnts/bin/de/AntMe.SharedComponents.resources.dll new file mode 100644 index 0000000..c856681 Binary files /dev/null and b/BrainArmyAnts/bin/de/AntMe.SharedComponents.resources.dll differ diff --git a/BrainArmyAnts/bin/de/AntMe.Simulation.resources.dll b/BrainArmyAnts/bin/de/AntMe.Simulation.resources.dll new file mode 100644 index 0000000..2a4efcc Binary files /dev/null and b/BrainArmyAnts/bin/de/AntMe.Simulation.resources.dll differ diff --git a/BrainArmyAnts/obj/Debug/0b3d7f9b-939a-426b-8baf-2927d0756b0b_AntMe.Player.BrainArmyAnts.dll b/BrainArmyAnts/obj/Debug/0b3d7f9b-939a-426b-8baf-2927d0756b0b_AntMe.Player.BrainArmyAnts.dll new file mode 100644 index 0000000..3efedde Binary files /dev/null and b/BrainArmyAnts/obj/Debug/0b3d7f9b-939a-426b-8baf-2927d0756b0b_AntMe.Player.BrainArmyAnts.dll differ diff --git a/BrainArmyAnts/obj/Debug/69b1b14f-f694-4587-816a-b7ad681fbd5f_AntMe.Player.BrainArmyAnts.dll b/BrainArmyAnts/obj/Debug/69b1b14f-f694-4587-816a-b7ad681fbd5f_AntMe.Player.BrainArmyAnts.dll new file mode 100644 index 0000000..4a6b298 Binary files /dev/null and b/BrainArmyAnts/obj/Debug/69b1b14f-f694-4587-816a-b7ad681fbd5f_AntMe.Player.BrainArmyAnts.dll differ diff --git a/BrainArmyAnts/obj/Debug/9ba1be31-ba78-49af-b9ab-81f462c5dfd0_AntMe.Player.BrainArmyAnts.dll b/BrainArmyAnts/obj/Debug/9ba1be31-ba78-49af-b9ab-81f462c5dfd0_AntMe.Player.BrainArmyAnts.dll new file mode 100644 index 0000000..e388f8e Binary files /dev/null and b/BrainArmyAnts/obj/Debug/9ba1be31-ba78-49af-b9ab-81f462c5dfd0_AntMe.Player.BrainArmyAnts.dll differ diff --git a/BrainArmyAnts/obj/Debug/AntMe.Player.BrainArmyAnts.dll b/BrainArmyAnts/obj/Debug/AntMe.Player.BrainArmyAnts.dll new file mode 100644 index 0000000..daa2beb Binary files /dev/null and b/BrainArmyAnts/obj/Debug/AntMe.Player.BrainArmyAnts.dll differ diff --git a/BrainArmyAnts/obj/Debug/AntMe.Player.BrainArmyAnts.pdb b/BrainArmyAnts/obj/Debug/AntMe.Player.BrainArmyAnts.pdb new file mode 100644 index 0000000..66aee83 Binary files /dev/null and b/BrainArmyAnts/obj/Debug/AntMe.Player.BrainArmyAnts.pdb differ diff --git a/BrainArmyAnts/obj/Debug/BrainArmyAnts.csproj.CopyComplete b/BrainArmyAnts/obj/Debug/BrainArmyAnts.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/BrainArmyAnts/obj/Debug/BrainArmyAnts.csproj.CoreCompileInputs.cache b/BrainArmyAnts/obj/Debug/BrainArmyAnts.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..0e6d6d3 --- /dev/null +++ b/BrainArmyAnts/obj/Debug/BrainArmyAnts.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +478fbae6997bd38d8e7edb8a7243770c6e5fd442 diff --git a/BrainArmyAnts/obj/Debug/BrainArmyAnts.csproj.FileListAbsolute.txt b/BrainArmyAnts/obj/Debug/BrainArmyAnts.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..a1cea08 --- /dev/null +++ b/BrainArmyAnts/obj/Debug/BrainArmyAnts.csproj.FileListAbsolute.txt @@ -0,0 +1,12 @@ +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\AntMe.Player.BrainArmyAnts.dll +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\AntMe.Player.BrainArmyAnts.pdb +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\AntMe.SharedComponents.dll +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\AntMe.Simulation.dll +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\AntMe.SharedComponents.xml +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\AntMe.Simulation.xml +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\de\AntMe.SharedComponents.resources.dll +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\bin\de\AntMe.Simulation.resources.dll +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\obj\Debug\BrainArmyAnts.csprojResolveAssemblyReference.cache +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\obj\Debug\AntMe.Player.BrainArmyAnts.dll +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\obj\Debug\AntMe.Player.BrainArmyAnts.pdb +D:\nextcloud\Documents\Programmierung\CSharp\BrainArmyAnts\BrainArmyAnts\obj\Debug\BrainArmyAnts.csproj.CoreCompileInputs.cache diff --git a/BrainArmyAnts/obj/Debug/BrainArmyAnts.csprojResolveAssemblyReference.cache b/BrainArmyAnts/obj/Debug/BrainArmyAnts.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..ca1b0ef Binary files /dev/null and b/BrainArmyAnts/obj/Debug/BrainArmyAnts.csprojResolveAssemblyReference.cache differ diff --git a/BrainArmyAnts/obj/Debug/dc042a9a-951b-4a05-a46e-26f4d869a261_AntMe.Player.BrainArmyAnts.dll b/BrainArmyAnts/obj/Debug/dc042a9a-951b-4a05-a46e-26f4d869a261_AntMe.Player.BrainArmyAnts.dll new file mode 100644 index 0000000..241d937 Binary files /dev/null and b/BrainArmyAnts/obj/Debug/dc042a9a-951b-4a05-a46e-26f4d869a261_AntMe.Player.BrainArmyAnts.dll differ diff --git a/BrainArmyAnts/obj/Debug/e00ea241-7837-411f-afb8-c5be6f9e188c_AntMe.Player.BrainArmyAnts.dll b/BrainArmyAnts/obj/Debug/e00ea241-7837-411f-afb8-c5be6f9e188c_AntMe.Player.BrainArmyAnts.dll new file mode 100644 index 0000000..140916d Binary files /dev/null and b/BrainArmyAnts/obj/Debug/e00ea241-7837-411f-afb8-c5be6f9e188c_AntMe.Player.BrainArmyAnts.dll differ