private boolean searchOne4() { if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%4; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%4; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%4; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%4; return false; }
private boolean searchOne8() { if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%8; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%8; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%8; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%8; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%8; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%8; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%8; if( checkOne(indexBinary + offsetsBinary[dir])) return true; dir = (dir+1)%8; return false; }