diff --git a/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/CurrentState.java b/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/CurrentState.java index 47fef48..c1039b7 100644 --- a/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/CurrentState.java +++ b/src/main/java/it/polimi/ingsw/gc14/Model/GamePackage/CurrentState.java @@ -66,7 +66,6 @@ public class CurrentState { // endregion setters // region Constructors - // TODO controllare valori di NUpper, NLower, Round public CurrentState(){ this.player = null; this.slot = null; @@ -82,8 +81,15 @@ public class CurrentState { public void PlayerUpdate(Player player, Slot slot){ this.player = player; this.slot = slot; - this.NUpper = slot.getNUpper(); - this.NLower = slot.getNLower(); + if(slot == null){ + this.NUpper = 0; + this.NLower = 0; + } + else{ + this.NUpper = slot.getNUpper(); + this.NLower = slot.getNLower(); + } + } // endregion functions }