Hi,
I get an error message "this method must return a result of type boolean" for the code bellow.
w is an integer (assumed to be 1 or 0) and the loop is supposed to move right along the specified row and look for a sequence of 1s or 0s of length len. If such a sequence is found I want to get true and otherwise false.
private boolean looking (int rows, int columns, int w, int len) {
for (int q = 1; q < len + 1; q++){
if (q == len) return true;
if (this.board [rows] [columns + q] != w) return false;}}
I'd appreciate any imput on what the problem is,
Thanks.