From 8c4e337e8216813ab14f42c9320aa4b8b2dd6a5f Mon Sep 17 00:00:00 2001 From: Wafa Sadri Date: Fri, 11 Apr 2014 11:39:38 +0200 Subject: [PATCH] YourID erzeugt und wird jetzt auch benutzt --- inf3.csproj | 1 + src/Parser.cs | 13 +++---------- src/YourID.cs | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 src/YourID.cs diff --git a/inf3.csproj b/inf3.csproj index c1d8b12..1d98db6 100644 --- a/inf3.csproj +++ b/inf3.csproj @@ -64,6 +64,7 @@ + \ No newline at end of file diff --git a/src/Parser.cs b/src/Parser.cs index e8fa805..4095123 100644 --- a/src/Parser.cs +++ b/src/Parser.cs @@ -194,12 +194,11 @@ namespace WorldOfPeacecraft string src = mesBlock.GetStringValue ("src"); string txt = mesBlock.GetStringValue ("txt"); Message m = new Message (srcid, src, txt); - //TODO Herausfinden wie wir das oben lösen (gilt für alle Funktionenstümpfe) } private void ProcessAnswer (Block block) { - // TODO + // TODO or not TODO } private void ProcessResult (Block procBlock) @@ -229,18 +228,14 @@ namespace WorldOfPeacecraft d = Decision.SKIRMISH; Opponent o = new Opponent (id, points, total, d); } - //DRAGON|STAGHUNT|SKIRMISH private void ProcessDecision(Block block) { - //TODO -> Wafa - //OK das ist hier so'n bissle der gleiche scheiß wie "Answer" wie soll das gehn, ohne Block!? - //Maybe not TODO? + //TODO when "ProcessAnswer" is done } private void ProcessChallenge (Block challengeBlock) { - //TODO -> Samed int id = challengeBlock.GetIntValue("id"); String type; switch (challengeBlock.GetStringValue()) @@ -257,7 +252,6 @@ namespace WorldOfPeacecraft } bool accepted = challengeBlock.GetBoolValue("accepted"); Challenge c = new Challenge(id, type, accepted); - //CHALLENGE: "begin:challenge","id:",INT,"type:",("DRAGON"|"STAGHUNT"|"SKIRMISH"),"accepted:",BOOLEAN,"end:challenge" } private void ProcessPlayer (Block playerBlock) @@ -275,8 +269,7 @@ namespace WorldOfPeacecraft LinkedList unnamedValues = yourIdBlock.GetUnnamedValues (); string stringValue = unnamedValues.First.Value; int intValue = int.Parse (stringValue); - //YourID id = new YourID (intValue); - //TODO Herausfinden wie wir das oben lösen + YourID id = new YourID (intValue); } private void ProcessTime (Block timeBlock) diff --git a/src/YourID.cs b/src/YourID.cs new file mode 100644 index 0000000..9fa3208 --- /dev/null +++ b/src/YourID.cs @@ -0,0 +1,14 @@ +using System; + +namespace inf3 +{ + public class YourID + { + int value_; + public YourID (int value) + { + value_ = value; + } + } +} +