Describe the bug
When a district size of zero is used to generate patterns in StarGenerator.java's generate() method, the compiled program causes a stack overflow.
To Reproduce
Steps to reproduce the behavior:
Use StarGenerator.generate(0) to instantiate an ArrayList<ArrayList\> object
Compile program
Run program
Expected behavior
Should return an empty ArrayList<ArrayList\> object
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
OS: N/A
Browser: N/A
Version: Redistricting_1.0.1
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
Having looked into the issue a potential solution is to check for this particular case at the beginning of the generate method and if district size == 0 return an empty ArrayList<ArrayList\>
Describe the bug When a district size of zero is used to generate patterns in StarGenerator.java's generate() method, the compiled program causes a stack overflow.
To Reproduce Steps to reproduce the behavior:
Expected behavior Should return an empty ArrayList<ArrayList\> object
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Having looked into the issue a potential solution is to check for this particular case at the beginning of the generate method and if district size == 0 return an empty ArrayList<ArrayList\>