Added a first Lobby Constructor.
Added Event/Request differentiation (as comments).
This commit is contained in:
parent
f471b66eb6
commit
c1bc8042ee
@ -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(){
|
||||
|
Loading…
Reference in New Issue
Block a user