I create this board with my code:
1 2 3 4 51x x x x x 2x x x x x3x k x x x4x x x k x5x x x x x
I want to replace the board above with the board below, that is all the 'k'='*' and any values surrounding k have a counter.
1 2 3 4 5 10 0 0 0 0 21 1 1 0 0 31 k 2 1 1 41 1 2 k 1 50 0 1 1 1
How would I go about doing this?
Best Answer