while loops are good for when you don't know how many times you're going to iterate through the loop, but in this case we know how many times we'll iterate (this loop iterates through your rows).  So instead of this while loop, how about this:

``` java
for (int row = 0; row < NBRICKS_ROWS; ++row) {
...
}
```