fix: fixed building gamestate events (and the tests relating to that)
This commit is contained in:
parent
bbcff5d94b
commit
4203092f9a
@ -269,7 +269,9 @@ public class EventBuilder {
|
|||||||
gameStateEvent.type = this.type;
|
gameStateEvent.type = this.type;
|
||||||
gameStateEvent.entities = this.entities;
|
gameStateEvent.entities = this.entities;
|
||||||
gameStateEvent.turnOrder = this.turnOrder;
|
gameStateEvent.turnOrder = this.turnOrder;
|
||||||
|
gameStateEvent.mapSize = this.mapSize;
|
||||||
gameStateEvent.activeCharacter = this.activeCharacter;
|
gameStateEvent.activeCharacter = this.activeCharacter;
|
||||||
|
gameStateEvent.stoneCooldowns = this.stoneCooldowns;
|
||||||
gameStateEvent.winCondition = this.winCondition;
|
gameStateEvent.winCondition = this.winCondition;
|
||||||
return gameStateEvent;
|
return gameStateEvent;
|
||||||
}
|
}
|
||||||
|
@ -259,7 +259,9 @@ class EventBuilderTest {
|
|||||||
assertThat(new EventBuilder(EventType.GameStateEvent) // no exception if all properties present
|
assertThat(new EventBuilder(EventType.GameStateEvent) // no exception if all properties present
|
||||||
.withEntities(entities)
|
.withEntities(entities)
|
||||||
.withTurnOrder(turns)
|
.withTurnOrder(turns)
|
||||||
|
.withMapSize(new IntVector2(42, 24))
|
||||||
.withActiveCharacter(turn)
|
.withActiveCharacter(turn)
|
||||||
|
.withStoneCooldowns(new Integer[] {6, 5, 4, 3, 2, 1})
|
||||||
.withWinCondition(false)
|
.withWinCondition(false)
|
||||||
.buildGameStateEvent()
|
.buildGameStateEvent()
|
||||||
.check()).isTrue();
|
.check()).isTrue();
|
||||||
|
Loading…
Reference in New Issue
Block a user