Skip to content
Browse files

Fix indenting on BBtree, & move int swelling up to top

  • Loading branch information...
1 parent 390e856 commit afa462101757e9efd9f2370046b53cb90fd33463 @danbernier committed
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/wordcram/BBTree.java
View
11 src/wordcram/BBTree.java
@@ -30,6 +30,8 @@
private int rootX;
private int rootY;
+ int swelling = 0;
+
BBTree(int x, int y, int right, int bottom) {
this.x = x;
this.y = y;
@@ -99,17 +101,16 @@ private boolean rectCollide(BBTree aTree, BBTree bTree) {
}
boolean containsPoint(float x, float y) {
- return this.rootX + this.x < x &&
- this.rootX + this.right > x &&
- this.rootY + this.y < y &&
- this.rootY + this.bottom > y;
+ return this.rootX + this.x < x &&
+ this.rootX + this.right > x &&
+ this.rootY + this.y < y &&
+ this.rootY + this.bottom > y;
}
boolean isLeaf() {
return kids == null;
}
- int swelling = 0;
void swell(int extra) {
swelling += extra;
if (!isLeaf()) {

0 comments on commit afa4621

Please sign in to comment.
Something went wrong with that request. Please try again.