Given the specific parameters (size
, wall
, start
and target
), you should build a virtual block map. If the size
is 10, then it will be a 10x10 blocks map. Each block is numbered sequentially from left to right, then top to bottom. The initial value for this sequence is 1.
If the size
value is 6, then the map will be like this,