added more logic for the server state diagram
This commit is contained in:
@@ -29,6 +29,8 @@ public class Game {
|
||||
private Boolean allRanked = false;
|
||||
private Boolean movablePieces = false;
|
||||
|
||||
private Boolean allReady = false;
|
||||
|
||||
private static final int AMOUNT_OF_TURBO_CARDS = 16;
|
||||
private static final int AMOUNT_OF_SHIELD_AND_SWAP_CARDS = 12;
|
||||
|
||||
@@ -397,6 +399,25 @@ public void setStartPlayer(Player startPlayer) {
|
||||
this.startPlayer = startPlayer;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the all ready state.
|
||||
*
|
||||
* @return the all ready state
|
||||
*/
|
||||
public Boolean allReady() {
|
||||
return allReady;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method sets the all ready state.
|
||||
*
|
||||
* @param allReady the new all ready state
|
||||
*/
|
||||
public void setAllReady(Boolean allReady) {
|
||||
this.allReady = allReady;
|
||||
if (allReady) notifyObservers();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method notifies the observers.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user