Commit 4199b319 authored by dkonam's avatar dkonam
Browse files

Data | remove game after leave game call by creator

parent 5526962a
......@@ -430,6 +430,17 @@ public class GameMediator {
if (this.currentGame.getStatGame().getWinner() == null) {
this.giveUp();
}
//if creator => delete game
if(this.currentGame.getStatGame().getCreator().getId().equals(this.dataFacade.getMyPublicUserProfile().getId()))
{
Logger.getLogger(GameMediator.class.getName()).info("delete game by creator after leave game");
this.dataFacade.getComfacade().removeGame(this.currentGame.getId());
this.removeGame(this.getCurrentGame().getId());
}
}
}
......
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