diff --git a/inf3.csproj b/inf3.csproj
index 22ec838..bea499b 100644
--- a/inf3.csproj
+++ b/inf3.csproj
@@ -57,6 +57,7 @@
+
diff --git a/src/Challenge.cs b/src/Challenge.cs
index 43f3aea..5f0b26c 100644
--- a/src/Challenge.cs
+++ b/src/Challenge.cs
@@ -5,9 +5,9 @@ namespace WorldOfPeacecraft
public class Challenge
{
int id_;
- string type_;
+ GameType type_;
bool accepted_;
- public Challenge (int id, string type, bool accepted)
+ public Challenge (int id, GameType type, bool accepted)
{
id_ = id;
type_ = type;
diff --git a/src/GameStrategy.cs b/src/GameStrategy.cs
index 5507dec..6c8f594 100644
--- a/src/GameStrategy.cs
+++ b/src/GameStrategy.cs
@@ -24,7 +24,7 @@ namespace WorldOfPeacecraft
return cooperate;
}
- public Decision nextMove(Decision opLM)
+ public Decision getNextMove(Decision opLM)
{
if (opLM == cooperate && counter == 0)
{
diff --git a/src/Parser.cs b/src/Parser.cs
index cda8da3..0c8d98b 100644
--- a/src/Parser.cs
+++ b/src/Parser.cs
@@ -267,19 +267,19 @@ namespace WorldOfPeacecraft
private void ProcessChallenge (Block challengeBlock)
{
int id = challengeBlock.GetIntValue(ValueId);
- String type;
+ GameType type;
LinkedList value = challengeBlock.GetUnnamedValues();
// TODO check value size, better name
switch (value.First.Value)
{
case EValueDragon:
- type = "Dragon";
+ type = GameType.DRAGON;
break;
case EValueStagunt:
- type = "Staghunt";
+ type = GameType.STAGHUNT;
break;
case EValueSkirmish:
- type = "Skirmisch";
+ type = GameType.SKIRMISH;
break;
default:
throw new ParsingException("Invalid type"); // TODO Better message
diff --git a/src/Skirmish.cs b/src/Skirmish.cs
index 901b323..f0ac41b 100644
--- a/src/Skirmish.cs
+++ b/src/Skirmish.cs
@@ -18,6 +18,11 @@ namespace WorldOfPeacecraft
return getNextMove();
}
+ public Decision getNextMove(Decision opLM)
+ {
+ return getNextMove();
+ }
+
public Decision getNextMove()
{
int randomNumber = random.Next(0, 2);