refactor: make use of new method supporting ArrayList
This commit is contained in:
parent
6557e748af
commit
c9ebc2c1c7
@ -21,7 +21,7 @@ public class GameStateSegment implements Segment {
|
|||||||
@Override
|
@Override
|
||||||
public void processRequests(Packet packet, List<Event> carrier, AtomicBoolean abort) {
|
public void processRequests(Packet packet, List<Event> carrier, AtomicBoolean abort) {
|
||||||
Logger.trace("GameStateSegment received {} requests.", packet.size());
|
Logger.trace("GameStateSegment received {} requests.", packet.size());
|
||||||
var result = game.checkRequestsAndApply(packet.toArray(new Request[0]));
|
var result = game.checkRequestsAndApply(packet);
|
||||||
Logger.trace("GameLogic generated {} events", result.map(List::size).orElse(0));
|
Logger.trace("GameLogic generated {} events", result.map(List::size).orElse(0));
|
||||||
if (result.isPresent()) {
|
if (result.isPresent()) {
|
||||||
Logger.trace("Result from GameLogic is present. Adding requests to carrier.");
|
Logger.trace("Result from GameLogic is present. Adding requests to carrier.");
|
||||||
|
Loading…
Reference in New Issue
Block a user