Index: common/Game.cpp
===================================================================
--- common/Game.cpp	(revision c991530c5271231502040caa8dace1bf5dc5486f)
+++ common/Game.cpp	(revision 8826eed86fc0b8ccfd70b3be2d1960c9fd4c4e7d)
@@ -3,4 +3,5 @@
 #include <iostream>
 #include <cstring>
+#include <cstdlib>
 
 #include "Common.h"
@@ -45,4 +46,21 @@
    if (players.find(p->getId()) == players.end()) {
       players[p->getId()] = p;
+
+      // reset player stats, location, etc.
+      p->pos.x = p->target.x = 200;
+      p->pos.y = p->target.y = 200;
+      p->setTargetPlayer(0);
+      p->isChasing = false;
+      p->isAttacking = false;
+      p->isDead = false;
+      p->health = p->maxHealth;
+      p->hasBlueFlag = false;
+      p->hasRedFlag = false;
+
+      // choose a random team (either 0 or 1)
+      p->team = rand() % 2;
+
+      p->currentGame = this;
+
       return true;
    }
