A Labyrinth needs to be at least 2x2; 1x1 is pointless.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Manuel Friedli 2020-10-11 02:25:32 +02:00
parent a712c34c18
commit c17f73f9f6
3 changed files with 24 additions and 2 deletions

View file

@ -27,8 +27,8 @@ public class Labyrinth {
} }
public Labyrinth(final int width, final int height, final long randomSeed) { public Labyrinth(final int width, final int height, final long randomSeed) {
if (width <= 0 || height <= 0) { if (width <= 1 || height <= 1) {
throw new IllegalArgumentException("widht and height must be >=1"); throw new IllegalArgumentException("width and height must be >1");
} }
this.width = width; this.width = width;
this.height = height; this.height = height;

11
src/main/main.iml Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

11
src/test/test.iml Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>