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,11 +1,25 @@
package pp.mdga.server;
/**
* The ServerAutomaton class represents the top-level state machine for the server.
* It initializes the state machine and sets the initial state to Lobby.
*/
public class ServerAutomaton extends ServerStateMachine {
/**
* Constructs a new ServerAutomaton with the specified game logic.
*
* @param logic the server game logic
*/
public ServerAutomaton(ServerGameLogic logic) {
super(null, logic);
entry();
}
/**
* Returns the initial state of the state machine, which is Lobby.
*
* @return the initial state
*/
@Override
public Lobby initialState() {
return new Lobby(this, logic);