Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * percolates
- * check and see if the top row has a bottom[i] that is true
- */
- public boolean percolates() {
- boolean per = false;
- for (int i = (width * (width - 1) + 1);
- i <= width * width;
- i++) {
- per = top[i];
- }
- return per;
- }
- /* Errors:
- no errors, just not getting anything that says that it's percolating when i opened up a
- line from top to bottom. I'm quite sure that it's because i don't know how to stop this for
- loop when it finds something to make `per` true.
- */
Add Comment
Please, Sign In to add comment