Index: common/Player.cpp
===================================================================
--- common/Player.cpp	(revision c941e07f5cf4d644dc91a39373adab7b7055a0ec)
+++ common/Player.cpp	(revision 48801afdbe8c90d082871e29fc4e59ba3e65686d)
@@ -30,5 +30,5 @@
    this->range = 0;
    this->attackCooldown = 0;
-   this->team = 0;   // no team by default
+   this->team = TEAM_NONE;
    this->hasBlueFlag = false;
    this->hasRedFlag = false;
@@ -104,5 +104,5 @@
    this->range = 0;
    this->attackCooldown = 0;
-   this->team = 0;   // no team by default
+   this->team = TEAM_NONE;
    this->hasBlueFlag = false;
    this->hasRedFlag = false;
Index: common/Player.h
===================================================================
--- common/Player.h	(revision c941e07f5cf4d644dc91a39373adab7b7055a0ec)
+++ common/Player.h	(revision 48801afdbe8c90d082871e29fc4e59ba3e65686d)
@@ -39,4 +39,10 @@
       ATTACK_MELEE,
       ATTACK_RANGED
+   };
+
+   enum PlayerTeam {
+      TEAM_NONE,
+      TEAM_BLUE,
+      TEAM_RED
    };
 
@@ -84,5 +90,5 @@
    int range;
    unsigned long long attackCooldown;
-   int team; // 0 is none, 1 is blue, 2 is red
+   PlayerTeam team;
    bool hasBlueFlag;
    bool hasRedFlag;
Index: server/server.cpp
===================================================================
--- server/server.cpp	(revision c941e07f5cf4d644dc91a39373adab7b7055a0ec)
+++ server/server.cpp	(revision 48801afdbe8c90d082871e29fc4e59ba3e65686d)
@@ -139,8 +139,8 @@
                   switch (p->team)
                   {
-                  case 1:// blue team
+                  case Player::TEAM_BLUE:
                      spawnPos = p->currentGame->getMap()->getStructureLocation(STRUCTURE_BLUE_FLAG);
                      break;
-                  case 2:// red team
+                  case Player::TEAM_RED:
                      spawnPos = p->currentGame->getMap()->getStructureLocation(STRUCTURE_RED_FLAG);
                      break;
@@ -781,5 +781,5 @@
          map<unsigned int, Player*>& oldPlayers = g->getPlayers();
          g->addPlayer(p);
-         p->team = 0;
+         p->team = Player::TEAM_NONE;
 
          // send info to other players
@@ -922,5 +922,5 @@
          case STRUCTURE_BLUE_FLAG:
          {
-            if (p->team == 1 && p->hasRedFlag) {
+            if (p->team == Player::TEAM_BLUE && p->hasRedFlag) {
                // check that your flag is at your base
                pos = game->getMap()->getStructureLocation(STRUCTURE_BLUE_FLAG);
@@ -951,5 +951,5 @@
          case STRUCTURE_RED_FLAG:
          {
-            if (p->team == 2 && p->hasBlueFlag) {
+            if (p->team == Player::TEAM_RED && p->hasBlueFlag) {
                // check that your flag is at your base
                pos = game->getMap()->getStructureLocation(STRUCTURE_RED_FLAG);
@@ -1048,9 +1048,9 @@
 
          if (posDistance(p->pos, pos.toFloat()) < 10) {
-            if (p->team == 1 && itObjects->type == OBJECT_BLUE_FLAG) {
+            if (p->team == Player::TEAM_BLUE && itObjects->type == OBJECT_BLUE_FLAG) {
                structPos = game->getMap()->getStructureLocation(STRUCTURE_BLUE_FLAG);
                flagReturned = true;
                break;
-            } else if (p->team == 2 && itObjects->type == OBJECT_RED_FLAG) {
+            } else if (p->team == Player::TEAM_RED && itObjects->type == OBJECT_RED_FLAG) {
                structPos = game->getMap()->getStructureLocation(STRUCTURE_RED_FLAG);
                flagReturned = true;
