From c1bc8042ee17ce418c54188efd7f4a46389bd434 Mon Sep 17 00:00:00 2001 From: Richard Reiber Date: Wed, 5 May 2021 12:35:51 +0200 Subject: [PATCH] Added a first Lobby Constructor. Added Event/Request differentiation (as comments). --- .../uulm/teamname/marvelous/server/Lobby/Lobby.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Lobby.java b/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Lobby.java index 94a3304..ce3bda4 100644 --- a/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Lobby.java +++ b/Server/src/main/java/uulm/teamname/marvelous/server/Lobby/Lobby.java @@ -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(){