feat: add support for the GamestateEvent in applyEvent
This commit is contained in:
@ -7,6 +7,7 @@ import uulm.teamname.marvelous.gamelibrary.IntVector2;
|
||||
import uulm.teamname.marvelous.gamelibrary.config.*;
|
||||
import uulm.teamname.marvelous.gamelibrary.entities.*;
|
||||
import uulm.teamname.marvelous.gamelibrary.entities.Character;
|
||||
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
||||
import uulm.teamname.marvelous.gamelibrary.requests.*;
|
||||
|
||||
import java.util.*;
|
||||
@ -167,6 +168,16 @@ class GameLogicTest {
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void testGamestateEvent() {
|
||||
GameInstance a = new GameInstance(partyConfig, characterConfig, scenarioConfig);
|
||||
GameInstance b = new GameInstance(partyConfig, characterConfig, scenarioConfig);
|
||||
|
||||
b.applyEvents(a.startGame(player1Selection, player2Selection));
|
||||
|
||||
assertEquals(a.toString(), b.toString(), "Second GameInstance copies the state successfully");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testRasterize() {
|
||||
ArrayList<IntVector2> result = GameLogic.rasterize(new IntVector2(0, 0), new IntVector2(1, 1), false, false);
|
||||
|
Reference in New Issue
Block a user