86 lines
2.0 KiB
Java
86 lines
2.0 KiB
Java
package uulm.teamname.marvelous.server.Lobby;
|
|
|
|
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
|
import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
|
|
|
public class Lobby {
|
|
|
|
String gameID;
|
|
// GameState state; // TODO: needs to be changed to GameStateManager
|
|
|
|
|
|
|
|
public Lobby(String gameID){
|
|
//the LobbyManager can create a Lobby with a specific ID.
|
|
this.gameID = gameID;
|
|
}
|
|
|
|
public void recieveEvents(Request[] requests){
|
|
//Get Messages from the LobbyManager
|
|
//possible requests: MeleeAttackRequest, RangeAttackRequest, MoveRequest, ExchangeInfinityStoneRequest, UseInfinityStoneRequest.
|
|
}
|
|
|
|
public void sendEvents(Event[] events){
|
|
//Send Messages to the LobbyManager
|
|
//Events spliced in:
|
|
//Gamestate Events: Ack, Nack, Req, GamestateEvent, CustomEvent
|
|
//Entity Events: DestroyEntityEvent, HealedEvent, TakenDamageEvent, SpawnEntityEvent
|
|
//Character Events: MeleeAttackEvent, RangedAttackEvent, MoveEvent, UseInfinityStoneEvent, ExchangeInfinityStoneEvent
|
|
//Game Events: TimeoutEvent, TimeoutWarningEvent, WinEvent, RoundSetupEvent, TurnEvent, TurnTimeoutEvent, DisconnectEvent.
|
|
}
|
|
|
|
public void processEvents(){
|
|
//The largest Block to handle all possible Events
|
|
//To defuse this Method you could use the smaller Methods below.
|
|
}
|
|
|
|
public void pause(){
|
|
|
|
}
|
|
public void unpause(){
|
|
|
|
}
|
|
public void handleDisconnects(){
|
|
|
|
}
|
|
public void validateRequest(){
|
|
|
|
}
|
|
public void applyRequestToGamestate(){
|
|
|
|
}
|
|
public void generateEvents(){
|
|
|
|
}
|
|
public void saidEvents(){
|
|
|
|
}
|
|
public void DisconnectClient(){
|
|
|
|
}
|
|
public void checkCheating(){
|
|
|
|
}
|
|
public void SendGamestate(){
|
|
|
|
}
|
|
public void handleConnects(){
|
|
|
|
}
|
|
public void handleSpectators(){
|
|
|
|
}
|
|
public void handlePlayers(){
|
|
|
|
}
|
|
public void handleLogon(){
|
|
|
|
}
|
|
public void handleLogoff(){
|
|
|
|
}
|
|
public void closeLobby(){
|
|
|
|
}
|
|
}
|