YourID erzeugt und wird jetzt auch benutzt
This commit is contained in:
@@ -64,6 +64,7 @@
|
|||||||
<Compile Include="src\Opponent.cs" />
|
<Compile Include="src\Opponent.cs" />
|
||||||
<Compile Include="src\Result.cs" />
|
<Compile Include="src\Result.cs" />
|
||||||
<Compile Include="src\Challenge.cs" />
|
<Compile Include="src\Challenge.cs" />
|
||||||
|
<Compile Include="src\YourID.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup />
|
||||||
</Project>
|
</Project>
|
||||||
@@ -194,12 +194,11 @@ namespace WorldOfPeacecraft
|
|||||||
string src = mesBlock.GetStringValue ("src");
|
string src = mesBlock.GetStringValue ("src");
|
||||||
string txt = mesBlock.GetStringValue ("txt");
|
string txt = mesBlock.GetStringValue ("txt");
|
||||||
Message m = new Message (srcid, src, 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)
|
private void ProcessAnswer (Block block)
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO or not TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProcessResult (Block procBlock)
|
private void ProcessResult (Block procBlock)
|
||||||
@@ -229,18 +228,14 @@ namespace WorldOfPeacecraft
|
|||||||
d = Decision.SKIRMISH;
|
d = Decision.SKIRMISH;
|
||||||
Opponent o = new Opponent (id, points, total, d);
|
Opponent o = new Opponent (id, points, total, d);
|
||||||
}
|
}
|
||||||
//DRAGON|STAGHUNT|SKIRMISH
|
|
||||||
|
|
||||||
private void ProcessDecision(Block block)
|
private void ProcessDecision(Block block)
|
||||||
{
|
{
|
||||||
//TODO -> Wafa
|
//TODO when "ProcessAnswer" is done
|
||||||
//OK das ist hier so'n bissle der gleiche scheiß wie "Answer" wie soll das gehn, ohne Block!?
|
|
||||||
//Maybe not TODO?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProcessChallenge (Block challengeBlock)
|
private void ProcessChallenge (Block challengeBlock)
|
||||||
{
|
{
|
||||||
//TODO -> Samed
|
|
||||||
int id = challengeBlock.GetIntValue("id");
|
int id = challengeBlock.GetIntValue("id");
|
||||||
String type;
|
String type;
|
||||||
switch (challengeBlock.GetStringValue())
|
switch (challengeBlock.GetStringValue())
|
||||||
@@ -257,7 +252,6 @@ namespace WorldOfPeacecraft
|
|||||||
}
|
}
|
||||||
bool accepted = challengeBlock.GetBoolValue("accepted");
|
bool accepted = challengeBlock.GetBoolValue("accepted");
|
||||||
Challenge c = new Challenge(id, type, 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)
|
private void ProcessPlayer (Block playerBlock)
|
||||||
@@ -275,8 +269,7 @@ namespace WorldOfPeacecraft
|
|||||||
LinkedList <string> unnamedValues = yourIdBlock.GetUnnamedValues ();
|
LinkedList <string> unnamedValues = yourIdBlock.GetUnnamedValues ();
|
||||||
string stringValue = unnamedValues.First.Value;
|
string stringValue = unnamedValues.First.Value;
|
||||||
int intValue = int.Parse (stringValue);
|
int intValue = int.Parse (stringValue);
|
||||||
//YourID id = new YourID (intValue);
|
YourID id = new YourID (intValue);
|
||||||
//TODO Herausfinden wie wir das oben lösen
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProcessTime (Block timeBlock)
|
private void ProcessTime (Block timeBlock)
|
||||||
|
|||||||
14
src/YourID.cs
Normal file
14
src/YourID.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace inf3
|
||||||
|
{
|
||||||
|
public class YourID
|
||||||
|
{
|
||||||
|
int value_;
|
||||||
|
public YourID (int value)
|
||||||
|
{
|
||||||
|
value_ = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user