Guest User

Untitled

a guest
Dec 9th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. /*
  2. * percolates
  3. * check and see if the top row has a bottom[i] that is true
  4. */
  5. public boolean percolates() {
  6. boolean per = false;
  7. for (int i = (width * (width - 1) + 1);
  8. i <= width * width;
  9. i++) {
  10. per = top[i];
  11. }
  12. return per;
  13. }
  14.  
  15. /* Errors:
  16. no errors, just not getting anything that says that it's percolating when i opened up a
  17. line from top to bottom. I'm quite sure that it's because i don't know how to stop this for
  18. loop when it finds something to make `per` true.
  19. */
Add Comment
Please, Sign In to add comment