mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-24 23:59:44 +01:00
fixed addPlayer
This commit is contained in:
parent
3bdfd6a78a
commit
10b978debf
@ -40,12 +40,16 @@ public class Player implements FieldVisitor<Void>{
|
||||
private int rollResult;
|
||||
private PlayerHandler handler;
|
||||
|
||||
Player(int id, String name, PlayerHandler handler) {
|
||||
public Player(int id, String name, PlayerHandler handler) {
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
public Player(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class MonopolyServer implements MessageListener<HostedConnection>, Connec
|
||||
@Override
|
||||
public void connectionAdded(Server server, HostedConnection hostedConnection) {
|
||||
LOGGER.log(Level.INFO, "new connection {0}", hostedConnection); //NON-NLS
|
||||
logic.addPlayer(hostedConnection.getId());
|
||||
logic.addPlayer(new Player(hostedConnection.getId()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user