v0.6.0: implemented point connection limits for rooms

This commit is contained in:
Evan Debenham
2017-04-11 22:46:51 -04:00
parent 9a902d97bd
commit 7153104e4d
3 changed files with 36 additions and 16 deletions

View File

@@ -21,7 +21,7 @@
package com.watabou.utils;
import java.util.HashSet;
import java.util.ArrayList;
public class Rect {
@@ -133,8 +133,8 @@ public class Rect {
return shrink( 1 );
}
public HashSet<Point> getPoints() {
HashSet<Point> points = new HashSet<>(square()*2);
public ArrayList<Point> getPoints() {
ArrayList<Point> points = new ArrayList<>(square()*2);
for (int i = left; i <= right; i++)
for (int j = top; j <= bottom; j++)
points.add(new Point(i, j));