874fe4cc7e5b — cedricbonhomme 12 years ago
Bugfix: error when instantiating 'Game' object.
2 files changed, 2 insertions(+), 3 deletions(-)

M serveurPartie/game.cpp
M serveurPartie/main.cpp
M serveurPartie/game.cpp +1 -1
@@ 181,7 181,7 @@ void  * Game::traiterClient()
 	{
 		// si correct, on ajoute le joueur a la liste des joueurs avec ces coordonnes initiale, son identifiant, etc.
 		int x = 1, y = 1;
-		if ( this->addPlayer(Joueur::Joueur(tab[2], (this->numberPlayer + 1),
+		if ( this->addPlayer(Joueur(tab[2], (this->numberPlayer + 1),
 						inet_ntoa(from.sin_addr), tab[1], 1, 1)
 						) == -1)
 		{

          
M serveurPartie/main.cpp +1 -2
@@ 24,8 24,7 @@ int main(int argc, char **argv)
 	cin >> adresseServeurPrincipal;
 	cout << "Connexion au serveur...\n" << endl;
 
-	Game * jeux = new Game::Game(portEcoute, portLecture, portEcouteServeur,
-									portEcouteDistant, portEcouteServeurPrincipal, adresseServeurPrincipal);
+	Game * jeux = new Game(portEcoute, portLecture, portEcouteServeur, portEcouteDistant, portEcouteServeurPrincipal, adresseServeurPrincipal);
 
 	// Lancement thread d'ecoute du serveur :
 	pthread_t * join_toEcouteServeur = jeux->initEcouteServeur();