Fix: AddPlayerEvent

This commit is contained in:
rubenpirreram
2026-04-24 16:29:58 +02:00
parent 02dcb6e920
commit f065ad109f
@@ -8,8 +8,13 @@ import it.polimi.ingsw.gc14.View.IView;
import java.io.Serializable; import java.io.Serializable;
public class AddPlayer extends NetworkEvent implements Serializable { public class AddPlayer extends NetworkEvent implements Serializable {
public AddPlayer(String username) { private int proposedNPlayer;
public int getProposedNPlayer() {
return proposedNPlayer;
}
public AddPlayer(String username, int proposedNPlayer) {
super(username, EventType.ADD_PLAYER); super(username, EventType.ADD_PLAYER);
this.proposedNPlayer = proposedNPlayer;
} }
@Override @Override
public boolean apply(GameController gameController) public boolean apply(GameController gameController)