Skip to content
Snippets Groups Projects
Commit 0b2d5a93 authored by Rohan Gene Isaac Vance's avatar Rohan Gene Isaac Vance
Browse files

fixed bugs

parent 9b489e82
No related tags found
No related merge requests found
...@@ -118,12 +118,12 @@ public class DotsAndBoxesGrid { ...@@ -118,12 +118,12 @@ public class DotsAndBoxesGrid {
return false; return false;
} }
// if (getHorizontal(x, y) && if (getHorizontal(x, y) &&
// getHorizontal(x, y + 1) && getHorizontal(x, y + 1) &&
// getVertical(x, y) && getVertical(x, y) &&
// getVertical(x + 1, y)) { getVertical(x + 1, y)) {
// return true; return true;
// } }
return false; return false;
} }
...@@ -160,9 +160,9 @@ public class DotsAndBoxesGrid { ...@@ -160,9 +160,9 @@ public class DotsAndBoxesGrid {
} }
// FIXME: You need to throw an exception if the line was already drawn. // FIXME: You need to throw an exception if the line was already drawn.
// if (getHorizontal(x, y) == true) { if (getHorizontal(x, y) == true) {
// throw new RuntimeException(); throw new RuntimeException();
// } }
this.horizontals[x][y] = true; this.horizontals[x][y] = true;
...@@ -200,9 +200,9 @@ public class DotsAndBoxesGrid { ...@@ -200,9 +200,9 @@ public class DotsAndBoxesGrid {
throw new RuntimeException(); throw new RuntimeException();
} }
// You need to throw an exception if the line was already drawn. // You need to throw an exception if the line was already drawn.
// if (getVertical(x, y) == true) { if (getVertical(x, y) == true) {
// throw new RuntimeException(); throw new RuntimeException();
// } }
this.verticals[x][y] = true; this.verticals[x][y] = true;
// Try to claim the north or south boxes // Try to claim the north or south boxes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment