Add: CurrentState.java Added

This commit is contained in:
GabrieleRadice
2026-03-22 18:22:09 +01:00
parent 18ddaa839d
commit c8084ce469
@@ -0,0 +1,68 @@
package it.polimi.ingsw.gc14.Model.GamePackage;
import it.polimi.ingsw.gc14.Model.Player;
import it.polimi.ingsw.gc14.Model.Slot;
import it.polimi.ingsw.gc14.Model.GamePackage.GameStages;
public class CurrentState {
// Getters
private Player player;
public Player getCurrentPlayer(){
return player;
}
private Slot slot;
public Slot getSlot(){
return slot;
}
private int NUpper;
public int getNUpper(){
return NUpper;
}
private int NLower;
public int getNLower(){
return NLower;
}
private GameStages GameStage;
public GameStages getGameStage(){
return GameStage;
}
// End getters
// Setters
public void UpperDrawn(){
NUpper++;
}
public void LowerDrawn(){
NLower++;
}
public void GameStageUpdate(GameStages GameStage){
this.GameStage = GameStage;
}
// End setters
// Constructors
private CurrentState(Player player, Slot slot){
this.player = player;
this.slot = slot;
this.NUpper = 0;
this.NLower = 0;
this.GameStage = GameStages.WAITING;
}
// End constructors
// Functions
public void PlayerUpdate(Player player, Slot slot){
this.player = player;
this.slot = slot;
this.NUpper = 0;
this.NLower = 0;
}
// End functions
}