replacing value of 2D array

I doing the task where i have 2D array filled with '.' and after pressing n on keybord code have to be replaced with code below. I don't know how to do this and will be grateful for any help.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
 array now:               after pressing n:
       ............               ...1.......1
       ............               .0......1...
       ............               .....0......
       ............               .0.1.0.0.0.0
       ............               1.1....0..1.
       ............               .....0..1...
       ............               ..11....1...
       ............               0.....0....0
       ............               .1..1.....1.
       ............               ..0..0.0....
       ............               ..0..00....0
       ............               ...1..0..1..
Topic archived. No new replies allowed.