fix: add missing checks to game logic and fix events not being applied

This commit is contained in:
2021-06-01 17:59:45 +02:00
parent 9c2c814e98
commit 8e6f61a665
3 changed files with 98 additions and 3 deletions

View File

@ -44,7 +44,7 @@ class GameLogicTest {
scenarioConfig.name = generateName(20);
scenarioConfig.author = generateName(20);
scenarioConfig.scenario = new FieldType[30][30];
scenarioConfig.scenario = new FieldType[20][20];
for(int x = 0; x < scenarioConfig.scenario[0].length; x++) {
for(int y = 0; y < scenarioConfig.scenario.length; y++) {
if(Math.abs(randomIntegers.next() % 100) < 10) {
@ -170,6 +170,8 @@ class GameLogicTest {
Event actual = result.get(0);
assertEquals(EventType.GamestateEvent, actual.type, "First event should be a GameStateEvent");
System.out.println(game.toString());
}