Commit cb695a35 authored by dkonam's avatar dkonam
Browse files

send role

parent e9a9235e
......@@ -70,18 +70,19 @@ public abstract class Game extends SerializableEntity {
System.out.println("players == null");
}
if(this.players.size() == 1) {
if(this.players.size() <= 1) {
Player player = new Player(user);
this.players.add(player);
System.out.println("player "+player.getLightPublicUser().getId());
} else
} /*else
{
throw new DataException("Data : already two players in this "
+ "game, you can not add another one.");
}
}*/
} else if(role.equals("spectator")) {
this.spectators.add(user);
......
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