Feb 29, 2016 at 1:30am
fixed
Last edited on Feb 29, 2016 at 6:59pm
Feb 29, 2016 at 6:24pm
I tried to fix according to your ideas but somehow it still wont work correctly
Feb 29, 2016 at 6:31pm
Without seeing your updated code, I can't tell you what's wrong.
Line 32: Your condition is wrong.
|
if (i == 0 && i < DIM - 1 && cb[i][j] == 'B' && j == 0 && j < DIM - 1 && cb[i][j] == 'B')
|
That statement can only ever be true when i and j are 0.
You want:
|
if (i >= 0 && i < DIM - 1 && cb[i][j] == 'B' && j >= 0 && j < DIM - 1)
|
Last edited on Feb 29, 2016 at 6:46pm