result erstellt und benutzt im parser

This commit is contained in:
Wafa Sadri
2014-04-11 11:29:43 +02:00
parent 72279dbdcb
commit 1d26e2b8af
3 changed files with 23 additions and 2 deletions

View File

@@ -58,6 +58,7 @@
<Compile Include="src\ParsingException.cs" /> <Compile Include="src\ParsingException.cs" />
<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" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="src\DefaultGui\" /> <Folder Include="src\DefaultGui\" />

View File

@@ -210,7 +210,7 @@ namespace WorldOfPeacecraft
int delay = procBlock.GetIntValue ("delay"); int delay = procBlock.GetIntValue ("delay");
LinkedList <Block> block = procBlock.GetBlocks (); LinkedList <Block> block = procBlock.GetBlocks ();
ProcessOpponent (block.First.Value); ProcessOpponent (block.First.Value);
//Result r = new Result(round, running, delay); Result r = new Result(round, running, delay);
} }
private void ProcessOpponent(Block oppBlock) private void ProcessOpponent(Block oppBlock)
@@ -227,7 +227,7 @@ namespace WorldOfPeacecraft
d = Decision.STAGHUNT; d = Decision.STAGHUNT;
if (stringValue == "SKIRMISH") if (stringValue == "SKIRMISH")
d = Decision.SKIRMISH; d = Decision.SKIRMISH;
Opponent o = new Opponent (id, points, total, d);
} }
//DRAGON|STAGHUNT|SKIRMISH //DRAGON|STAGHUNT|SKIRMISH

20
src/Result.cs Normal file
View File

@@ -0,0 +1,20 @@
using System;
namespace inf3
{
public class Result
{
int round_;
bool running_;
int delay_;
public Result (int round, bool running, int delay)
{
round_ = round;
running_ = running;
delay_ = delay;
}
}
}
/*Result r = new Result(round, running, delay);*/