added more logic for the server state diagram

This commit is contained in:
Daniel Grigencha
2024-11-22 09:37:49 +01:00
parent 04501de11c
commit 89232901a7
21 changed files with 570 additions and 251 deletions

View File

@@ -1,10 +1,24 @@
package pp.mdga.server;
public class GameStateMachine extends ServerStateMachine{
/**
* The GameStateMachine class represents the state machine for the game state.
*/
public class GameStateMachine extends ServerStateMachine {
/**
* Constructs a new GameStateMachine with the specified parent state and game logic.
*
* @param parent the parent state
* @param logic the server game logic
*/
public GameStateMachine(ServerState parent, ServerGameLogic logic) {
super(parent, logic);
}
/**
* Returns the initial state of the state machine, which is DetermineStartPlayer.
*
* @return the initial state
*/
@Override
public DetermineStartPlayer initialState() {
return new DetermineStartPlayer(this, logic);