Ludii Forum
RunCustomMatch needs to be adapted to v1.0.2 - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Problems (https://ludii.games/forums/forumdisplay.php?fid=5)
+--- Forum: AI Problems (https://ludii.games/forums/forumdisplay.php?fid=7)
+--- Thread: RunCustomMatch needs to be adapted to v1.0.2 (/showthread.php?tid=135)



RunCustomMatch needs to be adapted to v1.0.2 - Wolfgang Konen - 08-16-2020

When running RunCustomMatch from LudiiExampleAI with Ludi-1.0.2.jar, I see an Exception

Warning! Game.create() has already previously been called on Reversi
Exception in thread "main" java.lang.RuntimeException: Place: The component Disc0 is expected but the corresponding component is not defined in the equipment.
at game.rules.start.place.item.PlaceItem.preprocess(PlaceItem.java:648)
at game.Game.create(Game.java:1304)
at tools.RunCustomMatch.main(RunCustomMatch.java:64)


When commenting out game.create(), everything runs through smoothly.

I assume this (and perhaps the other examples) has to be adapted.

Best regards
Wolfgang


RE: RunCustomMatch needs to be adapted to v1.0.2 - DennisSoemers - 08-16-2020

Yes, you're absolutely right, those game.create() calls used to be necessary in the past but shouldn't be used anymore (since they were ALWAYS necessary right after game compilation, we just moved it right into the game compilation itself).

That's fixed now in the Example AI repo. In our Ludii Tutorials repo we've already got Travis CI running every day and making sure it all still works fine whenever we push a new release, but not yet in this repo. Should take some time to set that up here too....