Index: client/makefile
===================================================================
--- client/makefile	(revision baaf6c8e1e4ab4af34de571269ff183b7cec6991)
+++ client/makefile	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -3,5 +3,5 @@
 FLAGS = $(LIB_FLAGS)
 COMMON_PATH = ../common
-DEPENDENCIES = Message.o chat.o GuiComponent.o Window.o Textbox.o Button.o
+DEPENDENCIES = Message.o Player.o chat.o GuiComponent.o Window.o Textbox.o Button.o
 
 gameClient : Client/main.cpp $(DEPENDENCIES)
@@ -9,4 +9,7 @@
 
 Message.o : $(COMMON_PATH)/Message.cpp
+	$(CC) -c -o $@ $? $(FLAGS)
+
+Player.o : $(COMMON_PATH)/Player.cpp
 	$(CC) -c -o $@ $? $(FLAGS)
 
Index: common/Common.cpp
===================================================================
--- common/Common.cpp	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
+++ common/Common.cpp	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -0,0 +1,14 @@
+#include "Common.h"
+
+void set_nonblock(int sock)
+{
+   #ifdef WIN32
+      unsigned long mode = 1;
+      ioctlsocket(sock, FIONBIO, &mode);
+   #else
+      int flags;
+      flags = fcntl(sock, F_GETFL,0);
+      assert(flags != -1);
+      fcntl(sock, F_SETFL, flags | O_NONBLOCK);
+   #endif
+}
Index: common/Common.h
===================================================================
--- common/Common.h	(revision baaf6c8e1e4ab4af34de571269ff183b7cec6991)
+++ common/Common.h	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -2,16 +2,14 @@
 #define _COMMON_H
 
-void set_nonblock(int sock)
+#include <fcntl.h>
+#include <assert.h>
+
+void set_nonblock(int sock);
+
+typedef struct
 {
-   #ifdef WIN32
-      unsigned long mode = 1;
-      ioctlsocket(sock, FIONBIO, &mode);
-   #else
-      int flags;
-      flags = fcntl(sock, F_GETFL,0);
-      assert(flags != -1);
-      fcntl(sock, F_SETFL, flags | O_NONBLOCK);
-   #endif
-}
+   int x;
+   int y;
+} PLAYER_POS;
 
 #endif
Index: common/Message.h
===================================================================
--- common/Message.h	(revision baaf6c8e1e4ab4af34de571269ff183b7cec6991)
+++ common/Message.h	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -6,4 +6,5 @@
 #define MSG_TYPE_LOGOUT       3
 #define MSG_TYPE_CHAT         4
+#define MSG_TYPE_PLAYER       5
 
 typedef struct
Index: common/Player.cpp
===================================================================
--- common/Player.cpp	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
+++ common/Player.cpp	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -0,0 +1,44 @@
+#include "Player.h"
+
+#include <iostream>
+#include <arpa/inet.h>
+
+using namespace std;
+
+Player::Player(string name, string password)
+{
+   this->name = name;
+   this->password = password;
+   this->pos.x = 200;
+   this->pos.y = 200;
+
+   cout << "Created new player: " << this->name << endl;
+}
+
+Player::Player(string name, sockaddr_in addr)
+{
+   this->name = name;
+   this->password = "";
+   this->pos.x = 200;
+   this->pos.y = 200;
+   this->addr = addr;
+
+   cout << "Created new played: " << this->name << endl;
+}
+
+Player::~Player()
+{
+}
+
+void Player::setAddr(sockaddr_in addr)
+{
+   this->addr = addr;
+}
+
+void Player::clearSensitiveInfo()
+{
+   this->password = "";
+   this->addr.sin_family = 0;
+   this->addr.sin_port = 0;
+   this->addr.sin_addr.s_addr = 0;
+}
Index: common/Player.h
===================================================================
--- common/Player.h	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
+++ common/Player.h	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -0,0 +1,26 @@
+#ifndef _PLAYER_H
+#define _PLAYER_H
+
+#include <netinet/in.h>
+#include <string>
+
+#include "Common.h"
+
+using namespace std;
+
+class Player {
+public:
+   Player(string name, string password);
+   Player(string name, sockaddr_in addr); // this will be deleted
+   ~Player();
+
+   void setAddr(sockaddr_in addr);
+   void clearSensitiveInfo();
+
+   string name;
+   string password;
+   sockaddr_in addr;
+   PLAYER_POS pos;
+};
+
+#endif
Index: server/DataAccess.h
===================================================================
--- server/DataAccess.h	(revision baaf6c8e1e4ab4af34de571269ff183b7cec6991)
+++ server/DataAccess.h	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -6,5 +6,5 @@
 #include <mysql/mysql.h>
 
-#include "Player.h"
+#include "../common/Player.h"
 
 using namespace std;
Index: rver/Player.cpp
===================================================================
--- server/Player.cpp	(revision baaf6c8e1e4ab4af34de571269ff183b7cec6991)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#include "Player.h"
-
-#include <iostream>
-#include <arpa/inet.h>
-
-using namespace std;
-
-Player::Player(string name, string password)
-{
-   this->name = name;
-   this->password = password;
-
-   cout << "Created new player: " << this->name << endl;
-}
-
-Player::Player(string name, sockaddr_in addr)
-{
-   this->name = name;
-   this->password = "";
-   this->addr = addr;
-
-   cout << "Created new played: " << this->name << endl;
-}
-
-Player::~Player()
-{
-}
-
-void Player::setAddr(sockaddr_in addr)
-{
-   this->addr = addr;
-}
Index: rver/Player.h
===================================================================
--- server/Player.h	(revision baaf6c8e1e4ab4af34de571269ff183b7cec6991)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#ifndef _PLAYER_H
-#define _PLAYER_H
-
-#include <netinet/in.h>
-#include <string>
-
-using namespace std;
-
-class Player {
-public:
-   Player(string name, string password);
-   Player(string name, sockaddr_in addr); // this will be deleted
-   ~Player();
-
-   void setAddr(sockaddr_in addr);
-
-   string name;
-   string password;
-   sockaddr_in addr;
-};
-
-#endif
Index: server/makefile
===================================================================
--- server/makefile	(revision baaf6c8e1e4ab4af34de571269ff183b7cec6991)
+++ server/makefile	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -3,10 +3,16 @@
 FLAGS = $(LIB_FLAGS)
 COMMON_PATH = ../common
-DEPENDENCIES = Message.o Player.o DataAccess.o
+DEPENDENCIES = Common.o Message.o Player.o DataAccess.o
 
 server : server.cpp $(DEPENDENCIES)
 	$(CC) -o $@ $+ $(FLAGS)
 
+Common.o : $(COMMON_PATH)/Common.cpp
+	$(CC) -c -o $@ $?
+
 Message.o : $(COMMON_PATH)/Message.cpp
+	$(CC) -c -o $@ $?
+
+Player.o : $(COMMON_PATH)/Player.cpp
 	$(CC) -c -o $@ $?
 
Index: server/server.cpp
===================================================================
--- server/server.cpp	(revision baaf6c8e1e4ab4af34de571269ff183b7cec6991)
+++ server/server.cpp	(revision edfd1d0c4704a1fe5d280e8fb985a4f956ff67d2)
@@ -7,7 +7,5 @@
 #include <vector>
 #include <algorithm>
-
-#include <fcntl.h>
-#include <assert.h>
+#include <cstring>
 
 #include <sys/socket.h>
@@ -16,13 +14,15 @@
 #include <arpa/inet.h>
 
+/*
 #include <openssl/bio.h>
 #include <openssl/ssl.h>
 #include <openssl/err.h>
+*/
 
 #include "../common/Compiler.h"
+#include "../common/Common.h"
 #include "../common/Message.h"
-#include "../common/Common.h"
-
-#include "Player.h"
+#include "../common/Player.h"
+
 #include "DataAccess.h"
 
@@ -63,4 +63,23 @@
 
    return NULL;
+}
+
+void broadcastPlayerPositions(vector<Player> &vec, int sock)
+{
+   vector<Player>::iterator it, it2;
+   NETWORK_MSG serverMsg;
+
+   serverMsg.type = MSG_TYPE_PLAYER;   
+
+   for (it = vec.begin(); it != vec.end(); it++)
+   {
+      strncpy(serverMsg.buffer, (char*)&*it, sizeof(Player));
+
+      for (it2 = vec.begin(); it2 != vec.end(); it2++)
+      {
+         if ( sendMessage(&serverMsg, sock, &(it2->addr)) < 0 )
+            error("sendMessage");
+      }
+   }
 }
 
@@ -73,7 +92,7 @@
    vector<Player> vctPlayers;
 
-   SSL_load_error_strings();
-   ERR_load_BIO_strings();
-   OpenSSL_add_all_algorithms();
+   //SSL_load_error_strings();
+   //ERR_load_BIO_strings();
+   //OpenSSL_add_all_algorithms();
 
    if (argc < 2) {
@@ -127,6 +146,7 @@
                error("sendMessage");
          }
-      }
-
+
+         broadcastPlayerPositions(vctPlayers, sock);
+      }
    }
 
