added more logic for the server state diagram
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user