Commit f01beb54 authored by Thibault Chiche's avatar Thibault Chiche
Browse files

log

parent 48e08946
......@@ -216,7 +216,7 @@ public class ComFacade {
* @param id is the UID of the player demanding to join the game
* @param game is the game in question
*/
public void joinGameResponse(boolean success, String id, Game game) {
public void joinGameResponse(boolean success, String id, StatGame game) {
M_JoinGameResponse m_joingameresponse = new M_JoinGameResponse(iDataCom.getMyPublicUserProfile(), success, game);
if (success) {
for (Inet4Address ip : kIpCtrl.getHashMap().values()) {
......
......@@ -23,15 +23,16 @@ import java.util.logging.Logger;
public class M_JoinGameResponse extends Message {
private final boolean success;
private final Game game;
private final StatGame game;
/**
* Constructor.
*
* @param user is the message's sender
* @param success is the response
* @param game
*/
public M_JoinGameResponse(PublicUser user, boolean success, Game game) {
public M_JoinGameResponse(PublicUser user, boolean success, StatGame game) {
super(user);
this.success = success;
this.game = game;
......@@ -40,11 +41,11 @@ public class M_JoinGameResponse extends Message {
@Override
public void callback(IDataCom iDataCom) {
if (success) {
try {
iDataCom.receptionGame(game);
/*try {
iDataCom.receptionGame(game.getRealGame());
} catch (DataException ex) {
Logger.getLogger(M_JoinGameResponse.class.getName()).log(Level.SEVERE, null, ex);
}
}*/
} else {
try {
iDataCom.connectionImpossible();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment