New iteration current position: (X:1 | Y:1) number of steps: 1
New position: (X:3 | Y:2)
Matrix at position: (X:3 | Y:2) is empty so it gets the value: 1
New iteration current position: (X:3 | Y:2) number of steps: 2
New position: (X:5 | Y:3)
Matrix at position: (X:5 | Y:3) is empty so it gets the value: 2
New iteration current position: (X:5 | Y:3) number of steps: 3
New position: (X:7 | Y:4)
Matrix at position: (X:7 | Y:4) is empty so it gets the value: 3
New iteration current position: (X:7 | Y:4) number of steps: 4
New position: (X:9 | Y:5)
Position: (X:9 | Y:5) is not in leagal range therfor try the next options
New position: (X:9 | Y:3)
Position: (X:9 | Y:3) is not in leagal range therfor try the next options
New position: (X:8 | Y:6)
Position: (X:8 | Y:6) is not in leagal range therfor try the next options
New position: (X:8 | Y:2)
Position: (X:8 | Y:2) is not in leagal range therfor try the next options
New position: (X:6 | Y:6)
Matrix at position: (X:6 | Y:6) is empty so it gets the value: 4
New iteration current position: (X:6 | Y:6) number of steps: 5
New position: (X:8 | Y:7)
Position: (X:8 | Y:7) is not in leagal range therfor try the next options
New position: (X:8 | Y:5)
Position: (X:8 | Y:5) is not in leagal range therfor try the next options
New position: (X:7 | Y:8)
Position: (X:7 | Y:8) is not in leagal range therfor try the next options
New position: (X:7 | Y:4)
The value: 3 at pos from the matrix position: (X:7 | Y:4) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:5 | Y:8)
Position: (X:5 | Y:8) is not in leagal range therfor try the next options
New position: (X:5 | Y:4)
Matrix at position: (X:5 | Y:4) is empty so it gets the value: 5
New iteration current position: (X:5 | Y:4) number of steps: 6
New position: (X:7 | Y:5)
Matrix at position: (X:7 | Y:5) is empty so it gets the value: 6
New iteration current position: (X:7 | Y:5) number of steps: 7
New position: (X:9 | Y:6)
Position: (X:9 | Y:6) is not in leagal range therfor try the next options
New position: (X:9 | Y:4)
Position: (X:9 | Y:4) is not in leagal range therfor try the next options
New position: (X:8 | Y:7)
Position: (X:8 | Y:7) is not in leagal range therfor try the next options
New position: (X:8 | Y:3)
Position: (X:8 | Y:3) is not in leagal range therfor try the next options
New position: (X:6 | Y:7)
Matrix at position: (X:6 | Y:7) is empty so it gets the value: 7
New iteration current position: (X:6 | Y:7) number of steps: 8
New position: (X:8 | Y:8)
Position: (X:8 | Y:8) is not in leagal range therfor try the next options
New position: (X:8 | Y:6)
Position: (X:8 | Y:6) is not in leagal range therfor try the next options
New position: (X:7 | Y:9)
Position: (X:7 | Y:9) is not in leagal range therfor try the next options
New position: (X:7 | Y:5)
The value: 6 at pos from the matrix position: (X:7 | Y:5) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:5 | Y:9)
Position: (X:5 | Y:9) is not in leagal range therfor try the next options
New position: (X:5 | Y:5)
Matrix at position: (X:5 | Y:5) is empty so it gets the value: 8
New iteration current position: (X:5 | Y:5) number of steps: 9
New position: (X:7 | Y:6)
Matrix at position: (X:7 | Y:6) is empty so it gets the value: 9
New iteration current position: (X:7 | Y:6) number of steps: 10
New position: (X:9 | Y:7)
Position: (X:9 | Y:7) is not in leagal range therfor try the next options
New position: (X:9 | Y:5)
Position: (X:9 | Y:5) is not in leagal range therfor try the next options
New position: (X:8 | Y:8)
Position: (X:8 | Y:8) is not in leagal range therfor try the next options
New position: (X:8 | Y:4)
Position: (X:8 | Y:4) is not in leagal range therfor try the next options
New position: (X:6 | Y:8)
Position: (X:6 | Y:8) is not in leagal range therfor try the next options
New position: (X:6 | Y:4)
Matrix at position: (X:6 | Y:4) is empty so it gets the value: 10
New iteration current position: (X:6 | Y:4) number of steps: 11
New position: (X:8 | Y:5)
Position: (X:8 | Y:5) is not in leagal range therfor try the next options
New position: (X:8 | Y:3)
Position: (X:8 | Y:3) is not in leagal range therfor try the next options
New position: (X:7 | Y:6)
The value: 9 at pos from the matrix position: (X:7 | Y:6) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:7 | Y:2)
Matrix at position: (X:7 | Y:2) is empty so it gets the value: 11
New iteration current position: (X:7 | Y:2) number of steps: 12
New position: (X:9 | Y:3)
Position: (X:9 | Y:3) is not in leagal range therfor try the next options
New position: (X:9 | Y:1)
Position: (X:9 | Y:1) is not in leagal range therfor try the next options
New position: (X:8 | Y:4)
Position: (X:8 | Y:4) is not in leagal range therfor try the next options
New position: (X:8 | Y:0)
Position: (X:8 | Y:0) is not in leagal range therfor try the next options
New position: (X:6 | Y:4)
The value: 10 at pos from the matrix position: (X:6 | Y:4) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:6 | Y:0)
Matrix at position: (X:6 | Y:0) is empty so it gets the value: 12
New iteration current position: (X:6 | Y:0) number of steps: 13
New position: (X:8 | Y:1)
Position: (X:8 | Y:1) is not in leagal range therfor try the next options
New position: (X:8 | Y:-1)
Position: (X:8 | Y:-1) is not in leagal range therfor try the next options
New position: (X:7 | Y:2)
The value: 11 at pos from the matrix position: (X:7 | Y:2) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:7 | Y:-2)
Position: (X:7 | Y:-2) is not in leagal range therfor try the next options
New position: (X:5 | Y:2)
Matrix at position: (X:5 | Y:2) is empty so it gets the value: 13
New iteration current position: (X:5 | Y:2) number of steps: 14
New position: (X:7 | Y:3)
Matrix at position: (X:7 | Y:3) is empty so it gets the value: 14
New iteration current position: (X:7 | Y:3) number of steps: 15
New position: (X:9 | Y:4)
Position: (X:9 | Y:4) is not in leagal range therfor try the next options
New position: (X:9 | Y:2)
Position: (X:9 | Y:2) is not in leagal range therfor try the next options
New position: (X:8 | Y:5)
Position: (X:8 | Y:5) is not in leagal range therfor try the next options
New position: (X:8 | Y:1)
Position: (X:8 | Y:1) is not in leagal range therfor try the next options
New position: (X:6 | Y:5)
Matrix at position: (X:6 | Y:5) is empty so it gets the value: 15
New iteration current position: (X:6 | Y:5) number of steps: 16
New position: (X:8 | Y:6)
Position: (X:8 | Y:6) is not in leagal range therfor try the next options
New position: (X:8 | Y:4)
Position: (X:8 | Y:4) is not in leagal range therfor try the next options
New position: (X:7 | Y:7)
Matrix at position: (X:7 | Y:7) is empty so it gets the value: 16
New iteration current position: (X:7 | Y:7) number of steps: 17
All matrix cells are filled, work is done!
New position: (X:7 | Y:3)
The value: 14 at pos from the matrix position: (X:7 | Y:3) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:5 | Y:7)
Matrix at position: (X:5 | Y:7) is empty so it gets the value: 16
New iteration current position: (X:5 | Y:7) number of steps: 17
All matrix cells are filled, work is done!
New position: (X:5 | Y:3)
The value: 2 at pos from the matrix position: (X:5 | Y:3) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:4 | Y:6)
Matrix at position: (X:4 | Y:6) is empty so it gets the value: 16
New iteration current position: (X:4 | Y:6) number of steps: 17
All matrix cells are filled, work is done!
New position: (X:4 | Y:4)
Matrix at position: (X:4 | Y:4) is empty so it gets the value: 16
New iteration current position: (X:4 | Y:4) number of steps: 17
All matrix cells are filled, work is done!
New position: (X:6 | Y:1)
Matrix at position: (X:6 | Y:1) is empty so it gets the value: 15
New iteration current position: (X:6 | Y:1) number of steps: 16
All matrix cells are filled, work is done!
New position: (X:5 | Y:4)
The value: 5 at pos from the matrix position: (X:5 | Y:4) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:5 | Y:2)
The value: 13 at pos from the matrix position: (X:5 | Y:2) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:7 | Y:1)
Matrix at position: (X:7 | Y:1) is empty so it gets the value: 14
New iteration current position: (X:7 | Y:1) number of steps: 15
All matrix cells are filled, work is done!
New position: (X:6 | Y:4)
The value: 10 at pos from the matrix position: (X:6 | Y:4) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:6 | Y:0)
The value: 12 at pos from the matrix position: (X:6 | Y:0) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:4 | Y:4)
The value: 16 at pos from the matrix position: (X:4 | Y:4) is greater than the number of steps therefor it will be overrided with the value: 14
New iteration current position: (X:4 | Y:4) number of steps: 15
All matrix cells are filled, work is done!
New position: (X:4 | Y:0)
Matrix at position: (X:4 | Y:0) is empty so it gets the value: 14
New iteration current position: (X:4 | Y:0) number of steps: 15
All matrix cells are filled, work is done!
New position: (X:3 | Y:3)
Matrix at position: (X:3 | Y:3) is empty so it gets the value: 14
New iteration current position: (X:3 | Y:3) number of steps: 15
All matrix cells are filled, work is done!
New position: (X:3 | Y:1)
Matrix at position: (X:3 | Y:1) is empty so it gets the value: 14
New iteration current position: (X:3 | Y:1) number of steps: 15
All matrix cells are filled, work is done!
New position: (X:5 | Y:-2)
Position: (X:5 | Y:-2) is not in leagal range therfor try the next options
New position: (X:4 | Y:1)
Matrix at position: (X:4 | Y:1) is empty so it gets the value: 13
New iteration current position: (X:4 | Y:1) number of steps: 14
All matrix cells are filled, work is done!
New position: (X:4 | Y:-1)
Position: (X:4 | Y:-1) is not in leagal range therfor try the next options
New position: (X:5 | Y:3)
The value: 2 at pos from the matrix position: (X:5 | Y:3) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:5 | Y:1)
Matrix at position: (X:5 | Y:1) is empty so it gets the value: 12
New iteration current position: (X:5 | Y:1) number of steps: 13
All matrix cells are filled, work is done!
New position: (X:5 | Y:6)
Matrix at position: (X:5 | Y:6) is empty so it gets the value: 11
New iteration current position: (X:5 | Y:6) number of steps: 12
All matrix cells are filled, work is done!
New position: (X:5 | Y:2)
The value: 13 at pos from the matrix position: (X:5 | Y:2) is greater than the number of steps therefor it will be overrided with the value: 11
New iteration current position: (X:5 | Y:2) number of steps: 12
All matrix cells are filled, work is done!
New position: (X:4 | Y:5)
Matrix at position: (X:4 | Y:5) is empty so it gets the value: 11
New iteration current position: (X:4 | Y:5) number of steps: 12
All matrix cells are filled, work is done!
New position: (X:4 | Y:3)
Matrix at position: (X:4 | Y:3) is empty so it gets the value: 11
New iteration current position: (X:4 | Y:3) number of steps: 12
All matrix cells are filled, work is done!
New position: (X:5 | Y:7)
The value: 16 at pos from the matrix position: (X:5 | Y:7) is greater than the number of steps therefor it will be overrided with the value: 10
New iteration current position: (X:5 | Y:7) number of steps: 11
All matrix cells are filled, work is done!
New position: (X:5 | Y:5)
The value: 8 at pos from the matrix position: (X:5 | Y:5) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:7 | Y:4)
The value: 3 at pos from the matrix position: (X:7 | Y:4) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:6 | Y:7)
The value: 7 at pos from the matrix position: (X:6 | Y:7) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:6 | Y:3)
Matrix at position: (X:6 | Y:3) is empty so it gets the value: 9
New iteration current position: (X:6 | Y:3) number of steps: 10
All matrix cells are filled, work is done!
New position: (X:4 | Y:7)
Matrix at position: (X:4 | Y:7) is empty so it gets the value: 9
New iteration current position: (X:4 | Y:7) number of steps: 10
All matrix cells are filled, work is done!
New position: (X:4 | Y:3)
The value: 11 at pos from the matrix position: (X:4 | Y:3) is greater than the number of steps therefor it will be overrided with the value: 9
New iteration current position: (X:4 | Y:3) number of steps: 10
All matrix cells are filled, work is done!
New position: (X:3 | Y:6)
Matrix at position: (X:3 | Y:6) is empty so it gets the value: 9
New iteration current position: (X:3 | Y:6) number of steps: 10
All matrix cells are filled, work is done!
New position: (X:3 | Y:4)
Matrix at position: (X:3 | Y:4) is empty so it gets the value: 9
New iteration current position: (X:3 | Y:4) number of steps: 10
All matrix cells are filled, work is done!
New position: (X:4 | Y:8)
Position: (X:4 | Y:8) is not in leagal range therfor try the next options
New position: (X:4 | Y:6)
The value: 16 at pos from the matrix position: (X:4 | Y:6) is greater than the number of steps therefor it will be overrided with the value: 8
New iteration current position: (X:4 | Y:6) number of steps: 9
All matrix cells are filled, work is done!
New position: (X:6 | Y:3)
The value: 9 at pos from the matrix position: (X:6 | Y:3) is greater than the number of steps therefor it will be overrided with the value: 7
New iteration current position: (X:6 | Y:3) number of steps: 8
All matrix cells are filled, work is done!
New position: (X:5 | Y:6)
The value: 11 at pos from the matrix position: (X:5 | Y:6) is greater than the number of steps therefor it will be overrided with the value: 7
New iteration current position: (X:5 | Y:6) number of steps: 8
All matrix cells are filled, work is done!
New position: (X:5 | Y:4)
The value: 5 at pos from the matrix position: (X:5 | Y:4) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:7 | Y:3)
The value: 14 at pos from the matrix position: (X:7 | Y:3) is greater than the number of steps therefor it will be overrided with the value: 6
New iteration current position: (X:7 | Y:3) number of steps: 7
All matrix cells are filled, work is done!
New position: (X:6 | Y:6)
The value: 4 at pos from the matrix position: (X:6 | Y:6) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:6 | Y:2)
Matrix at position: (X:6 | Y:2) is empty so it gets the value: 6
New iteration current position: (X:6 | Y:2) number of steps: 7
All matrix cells are filled, work is done!
New position: (X:4 | Y:6)
The value: 8 at pos from the matrix position: (X:4 | Y:6) is greater than the number of steps therefor it will be overrided with the value: 6
New iteration current position: (X:4 | Y:6) number of steps: 7
All matrix cells are filled, work is done!
New position: (X:4 | Y:2)
Matrix at position: (X:4 | Y:2) is empty so it gets the value: 6
New iteration current position: (X:4 | Y:2) number of steps: 7
All matrix cells are filled, work is done!
New position: (X:3 | Y:5)
Matrix at position: (X:3 | Y:5) is empty so it gets the value: 6
New iteration current position: (X:3 | Y:5) number of steps: 7
All matrix cells are filled, work is done!
New position: (X:3 | Y:3)
The value: 14 at pos from the matrix position: (X:3 | Y:3) is greater than the number of steps therefor it will be overrided with the value: 6
New iteration current position: (X:3 | Y:3) number of steps: 7
All matrix cells are filled, work is done!
New position: (X:4 | Y:7)
The value: 9 at pos from the matrix position: (X:4 | Y:7) is greater than the number of steps therefor it will be overrided with the value: 5
New iteration current position: (X:4 | Y:7) number of steps: 6
All matrix cells are filled, work is done!
New position: (X:4 | Y:5)
The value: 11 at pos from the matrix position: (X:4 | Y:5) is greater than the number of steps therefor it will be overrided with the value: 5
New iteration current position: (X:4 | Y:5) number of steps: 6
All matrix cells are filled, work is done!
New position: (X:6 | Y:2)
The value: 6 at pos from the matrix position: (X:6 | Y:2) is greater than the number of steps therefor it will be overrided with the value: 4
New iteration current position: (X:6 | Y:2) number of steps: 5
All matrix cells are filled, work is done!
New position: (X:5 | Y:5)
The value: 8 at pos from the matrix position: (X:5 | Y:5) is greater than the number of steps therefor it will be overrided with the value: 4
New iteration current position: (X:5 | Y:5) number of steps: 5
All matrix cells are filled, work is done!
New position: (X:5 | Y:3)
The value: 2 at pos from the matrix position: (X:5 | Y:3) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:7 | Y:2)
The value: 11 at pos from the matrix position: (X:7 | Y:2) is greater than the number of steps therefor it will be overrided with the value: 3
New iteration current position: (X:7 | Y:2) number of steps: 4
All matrix cells are filled, work is done!
New position: (X:6 | Y:5)
The value: 15 at pos from the matrix position: (X:6 | Y:5) is greater than the number of steps therefor it will be overrided with the value: 3
New iteration current position: (X:6 | Y:5) number of steps: 4
All matrix cells are filled, work is done!
New position: (X:6 | Y:1)
The value: 15 at pos from the matrix position: (X:6 | Y:1) is greater than the number of steps therefor it will be overrided with the value: 3
New iteration current position: (X:6 | Y:1) number of steps: 4
All matrix cells are filled, work is done!
New position: (X:4 | Y:5)
The value: 5 at pos from the matrix position: (X:4 | Y:5) is greater than the number of steps therefor it will be overrided with the value: 3
New iteration current position: (X:4 | Y:5) number of steps: 4
All matrix cells are filled, work is done!
New position: (X:4 | Y:1)
The value: 13 at pos from the matrix position: (X:4 | Y:1) is greater than the number of steps therefor it will be overrided with the value: 3
New iteration current position: (X:4 | Y:1) number of steps: 4
All matrix cells are filled, work is done!
New position: (X:3 | Y:4)
The value: 9 at pos from the matrix position: (X:3 | Y:4) is greater than the number of steps therefor it will be overrided with the value: 3
New iteration current position: (X:3 | Y:4) number of steps: 4
All matrix cells are filled, work is done!
New position: (X:3 | Y:2)
The value: 1 at pos from the matrix position: (X:3 | Y:2) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:5 | Y:1)
The value: 12 at pos from the matrix position: (X:5 | Y:1) is greater than the number of steps therefor it will be overrided with the value: 2
New iteration current position: (X:5 | Y:1) number of steps: 3
All matrix cells are filled, work is done!
New position: (X:4 | Y:4)
The value: 14 at pos from the matrix position: (X:4 | Y:4) is greater than the number of steps therefor it will be overrided with the value: 2
New iteration current position: (X:4 | Y:4) number of steps: 3
All matrix cells are filled, work is done!
New position: (X:4 | Y:0)
The value: 14 at pos from the matrix position: (X:4 | Y:0) is greater than the number of steps therefor it will be overrided with the value: 2
New iteration current position: (X:4 | Y:0) number of steps: 3
All matrix cells are filled, work is done!
New position: (X:2 | Y:4)
Matrix at position: (X:2 | Y:4) is empty so it gets the value: 2
New iteration current position: (X:2 | Y:4) number of steps: 3
All matrix cells are filled, work is done!
New position: (X:2 | Y:0)
Matrix at position: (X:2 | Y:0) is empty so it gets the value: 2
New iteration current position: (X:2 | Y:0) number of steps: 3
All matrix cells are filled, work is done!
New position: (X:1 | Y:3)
Matrix at position: (X:1 | Y:3) is empty so it gets the value: 2
New iteration current position: (X:1 | Y:3) number of steps: 3
All matrix cells are filled, work is done!
New position: (X:1 | Y:1)
The value: 0 at pos from the matrix position: (X:1 | Y:1) is smaller or equal than the number of steps therefor nothigs changed
New position: (X:3 | Y:0)
Matrix at position: (X:3 | Y:0) is empty so it gets the value: 1
New iteration current position: (X:3 | Y:0) number of steps: 2
All matrix cells are filled, work is done!
New position: (X:2 | Y:3)
Matrix at position: (X:2 | Y:3) is empty so it gets the value: 1
New iteration current position: (X:2 | Y:3) number of steps: 2
All matrix cells are filled, work is done!
New position: (X:2 | Y:-1)
Position: (X:2 | Y:-1) is not in leagal range therfor try the next options
New position: (X:0 | Y:3)
Matrix at position: (X:0 | Y:3) is empty so it gets the value: 1
New iteration current position: (X:0 | Y:3) number of steps: 2
All matrix cells are filled, work is done!
New position: (X:0 | Y:-1)
Position: (X:0 | Y:-1) is not in leagal range therfor try the next options
New position: (X:-1 | Y:2)
Position: (X:-1 | Y:2) is not in leagal range therfor try the next options
New position: (X:-1 | Y:0)
Position: (X:-1 | Y:0) is not in leagal range therfor try the next options
##|##|02|01|02|##|12|##|
##|00|##|14|03|02|03|14|
##|##|##|01|06|11|04|03|
01|02|01|06|09|02|07|06|
##|##|02|03|02|05|10|03|
##|##|##|06|03|04|03|06|
##|##|##|09|06|07|04|09|
##|##|##|##|05|10|07|16|