Index: common/Common.cpp
===================================================================
--- common/Common.cpp	(revision b81cea1525249587daadca75386913a591187256)
+++ common/Common.cpp	(revision 2df63d6c48dc89af5aeb007981c2354169abcd03)
@@ -2,5 +2,5 @@
 
 #include <iostream>
-using namespace std;
+#include <cmath>
 
 #if defined WINDOWS
@@ -9,4 +9,16 @@
    #include <time.h>
 #endif
+
+using namespace std;
+
+/*
+FLOAT_POSITION POSITION::toFloat() {
+   FLOAT_POSITION floatPosition;
+   floatPosition.x = x;
+   floatPosition.y = y;
+
+   return floatPosition;
+}
+*/
 
 void set_nonblock(int sock)
@@ -38,2 +50,9 @@
    return numMilliseconds;
 }
+
+float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2) {
+   float xDiff = pos2.x - pos1.x;
+   float yDiff = pos2.y - pos1.y;
+
+   return sqrt( pow(xDiff,2) + pow(yDiff,2) );   
+}
Index: common/Common.h
===================================================================
--- common/Common.h	(revision b81cea1525249587daadca75386913a591187256)
+++ common/Common.h	(revision 2df63d6c48dc89af5aeb007981c2354169abcd03)
@@ -12,13 +12,4 @@
 #endif
 
-void set_nonblock(int sock);
-unsigned long long getCurrentMillis();
-
-typedef struct
-{
-   int x;
-   int y;
-} POSITION;
-
 typedef struct
 {
@@ -27,3 +18,21 @@
 } FLOAT_POSITION;
 
+typedef struct
+{
+   int x;
+   int y;
+   //FLOAT_POSITION toFloat();
+   FLOAT_POSITION toFloat() {
+      FLOAT_POSITION floatPosition;
+      floatPosition.x = x;
+      floatPosition.y = y;
+
+      return floatPosition;
+   }
+} POSITION;
+
+void set_nonblock(int sock);
+unsigned long long getCurrentMillis();
+float posDistance(FLOAT_POSITION pos1, FLOAT_POSITION pos2);
+
 #endif
Index: common/Message.cpp
===================================================================
--- common/Message.cpp	(revision b81cea1525249587daadca75386913a591187256)
+++ common/Message.cpp	(revision 2df63d6c48dc89af5aeb007981c2354169abcd03)
@@ -19,4 +19,6 @@
    int ret =  sendto(sock, (char*)msg, sizeof(NETWORK_MSG), 0, (struct sockaddr *)dest, sizeof(struct sockaddr_in));
 
+   cout << "Send a message of type " << msg->type << endl;
+
    return ret;
 }
