feat: handle Req request and remove handling of lobby events
This commit is contained in:
@ -88,9 +88,15 @@ class GameLogic {
|
||||
.buildEntityEvent());
|
||||
//TODO: add infinity stone usage effect in GameLogic.executeRequest
|
||||
}
|
||||
case DisconnectRequest -> {
|
||||
result.add(new EventBuilder(EventType.DisconnectEvent)
|
||||
.buildGameEvent());
|
||||
case Req -> {
|
||||
result.add(new EventBuilder(EventType.GameStateEvent)
|
||||
.withEntities(state.entities.export())
|
||||
.withTurnOrder((EntityID[])state.turnOrder.toArray())
|
||||
.withMapSize(state.mapSize)
|
||||
.withActiveCharacter(state.activeCharacter)
|
||||
.withStoneCooldowns(state.stoneCooldown.export())
|
||||
.withWinCondition(state.won)
|
||||
.buildGameStateEvent());
|
||||
}
|
||||
}
|
||||
|
||||
@ -182,11 +188,8 @@ class GameLogic {
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
case DisconnectRequest -> {
|
||||
//TODO: add check for DisconnectRequest in GameLogic.checkRequest
|
||||
|
||||
case Req -> {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user