Enum in eigene Klasse verfrachtet, jetzt überall erhältlich!

This commit is contained in:
Wafa Sadri
2014-04-11 11:52:34 +02:00
parent 531ac335ee
commit 765b95374d
4 changed files with 12 additions and 4 deletions

View File

@@ -67,6 +67,7 @@
<Compile Include="src\YourID.cs" /> <Compile Include="src\YourID.cs" />
<Compile Include="src\DefaultGui\Time.cs" /> <Compile Include="src\DefaultGui\Time.cs" />
<Compile Include="src\DefaultGui\Online.cs" /> <Compile Include="src\DefaultGui\Online.cs" />
<Compile Include="src\EnumDecision.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
</Project> </Project>

10
src/EnumDecision.cs Normal file
View File

@@ -0,0 +1,10 @@
using System;
namespace WorldOfPeacecraft
{
public enum Decision
{
DRAGON, STAGHUNT, SKIRMISH
}
}

View File

@@ -1,13 +1,12 @@
using System; using System;
namespace inf3 namespace WorldOfPeacecraft
{ {
public class Opponent public class Opponent
{ {
int id_; int id_;
int points_; int points_;
int total_; int total_;
enum Decision {DRAGON, STAGHUNT, SKIRMISH};
Decision d_; Decision d_;
public Opponent (int id, int points, int total, Decision d) public Opponent (int id, int points, int total, Decision d)

View File

@@ -30,8 +30,6 @@ namespace WorldOfPeacecraft
private Regex LastLineRegex; private Regex LastLineRegex;
private Backend backend; private Backend backend;
enum Decision {DRAGON, STAGHUNT, SKIRMISH};
public Parser () public Parser ()
{ {
ParserThread = new Thread (new ThreadStart (this.RunParser)); ParserThread = new Thread (new ThreadStart (this.RunParser));