Files
Gruppe-01-fin/Projekte/mdga/model/src/main/java/pp.mdga/server/ServerAutomaton.java
2024-11-22 09:37:49 +01:00

28 lines
710 B
Java

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);
}
}