Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.44 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public static boolean pedineContigue (boolean S[][]) {
  2.                
  3.                 boolean contigue = false;
  4.                
  5.                 for (int i = 0; i< S.length; i++) {
  6.                         for (int j = 0; j < S[i].length; j++) {
  7.                                
  8.                                 do {
  9.                                         if(S[i][j] == S[i+1][j] || S[i][j] == S[i][j+1])
  10.                                                 contigue = true;
  11.                                        
  12.                                         else
  13.                                                 contigue = false;
  14.                                 } while(i<(S.length - 1) && j<(S[i].length -1));
  15.                         }
  16.                 }
  17.                
  18.                 if (contigue == true)
  19.                         return true;
  20.                 else
  21.                         return false;
  22.         }