Closed gioadami closed 5 years ago
I'll take a look; I didn't write DividedMazeGenerator (or if I did, it was years ago), but this should be easy enough to fix. I may regret saying that...
This has been fixed since April 5, 2018; my recommendation is to use JitPack to get the latest (or any recent) commit. You could just copy the relevant gradle configuration from a recently-updated SquidLib-Demos project, or from Epigon (links to both are in SquidLib's readme near the top). If you use Maven, you could copy working pom.xml dependencies from my tommyettinger/WarpWriter repo.
I haven't done an actual release in a while because JitPack has been working well for me. I may do a 3.0.0-b10 release at some point; some parts of SquidLib might need restructuring in some way (mainly related to simplex noise) and I don't want to release a stable 3.0.0 that's mid-refactor.
The cause, for anyone interested, was that a List was made with Arrays.asList()
and that doesn't support remove()
. My solution is to avoid having a ton of List implementations around and to use Maker.makeList()
to build an ArrayList directly, which does support deletion.
Invoking the following code (for S > 4)
DividedMazeGenerator mg = new DividedMazeGenerator(S, S);
boolean map4[][] = mg.create();
generates the following stack trace: