Added a first Lobby Constructor.

Added Event/Request differentiation (as comments).
This commit is contained in:
Richard Reiber 2021-05-05 12:35:51 +02:00
parent f471b66eb6
commit c1bc8042ee

View File

@ -5,12 +5,25 @@ public class Lobby {
String gameID;
GameState state;
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(){