challenge erzeugt und wird jetzt auch benutzt

This commit is contained in:
Wafa Sadri
2014-04-11 11:35:57 +02:00
parent ef31ddf949
commit 3488246873
3 changed files with 21 additions and 1 deletions

View File

@@ -63,6 +63,7 @@
<Compile Include="src\Message.cs" /> <Compile Include="src\Message.cs" />
<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" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
</Project> </Project>

19
src/Challenge.cs Normal file
View File

@@ -0,0 +1,19 @@
using System;
namespace inf3
{
public class Challenge
{
int id_;
string type_;
bool accepted_;
public Challenge (int id, string type, bool accepted)
{
id_ = id;
type_ = type;
accepted_ = accepted;
}
}
}
//Challenge c = new Challenge(id, type, accepted);

View File

@@ -256,7 +256,7 @@ namespace WorldOfPeacecraft
break; break;
} }
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" //CHALLENGE: "begin:challenge","id:",INT,"type:",("DRAGON"|"STAGHUNT"|"SKIRMISH"),"accepted:",BOOLEAN,"end:challenge"
} }