From 4203092f9aba2afb79f04b12d3f61abd938eb490 Mon Sep 17 00:00:00 2001 From: Yannik Bretschneider Date: Tue, 11 May 2021 03:20:19 +0200 Subject: [PATCH] fix: fixed building gamestate events (and the tests relating to that) --- .../teamname/marvelous/gamelibrary/events/EventBuilder.java | 2 ++ .../teamname/marvelous/gamelibrary/events/EventBuilderTest.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java index a8cbbc9..13ee0ef 100644 --- a/src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java +++ b/src/main/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilder.java @@ -269,7 +269,9 @@ public class EventBuilder { gameStateEvent.type = this.type; gameStateEvent.entities = this.entities; gameStateEvent.turnOrder = this.turnOrder; + gameStateEvent.mapSize = this.mapSize; gameStateEvent.activeCharacter = this.activeCharacter; + gameStateEvent.stoneCooldowns = this.stoneCooldowns; gameStateEvent.winCondition = this.winCondition; return gameStateEvent; } diff --git a/src/test/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilderTest.java b/src/test/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilderTest.java index 093a5ee..ac5231a 100644 --- a/src/test/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilderTest.java +++ b/src/test/java/uulm/teamname/marvelous/gamelibrary/events/EventBuilderTest.java @@ -259,7 +259,9 @@ class EventBuilderTest { assertThat(new EventBuilder(EventType.GameStateEvent) // no exception if all properties present .withEntities(entities) .withTurnOrder(turns) + .withMapSize(new IntVector2(42, 24)) .withActiveCharacter(turn) + .withStoneCooldowns(new Integer[] {6, 5, 4, 3, 2, 1}) .withWinCondition(false) .buildGameStateEvent() .check()).isTrue();