2

I am making a Java Mine Sweeper program. So far everything is going well except for the cascading and reveal. What would be the method about checking if there are any other spaces without bombs. Can someone take a look and help me? any help would be appreciated. Thanks!

public static void RevealCell(int a, int b, int row, int col, char[][] emptyboard, 
                             char [][] aBoard, boolean [][] revealed){

    if( aBoard[a][b] == 'B'){
        revealed[a][b]=true;
        return;
    }

    if (aBoard[a][b] == '1' || aBoard[a][b] == '2'){
        revealed[a][b] = true;
        return;
    }

    if (aBoard[a][b] == '0') {  
        revealed[a][b] = true;
    }
}
Anthon
  • 69,918
  • 32
  • 186
  • 246
  • @John3136 Look closer, `aBoard[a][b]` is a `char` so `aBoard[a][b] == 'B'` is correct. – Justin Apr 24 '13 at 04:58
  • It's unclear what the variables `a` and `b` mean when you already have `row` and `column`. Also what does it mean when a element in `aBoard` is `'1'` versus `'2'`? Can you provide more details about what variables are doing what? – Zhe Jul 23 '13 at 21:44

0 Answers0