How to double the size of 8x8 Grid whilst keeping the relative position of certain tiles intact?
- by ke3pup
Hi guys
I have grid size of size 8x8 , total of 64 Tiles.
i'm using this Grid to implement java search algorithms such as BFS and DFS.
The Grid has given forbidden Tiles (meaning they can't be traversed or be neighbour of any other tile) and Goal and Start tile. for example Tile 19,20,21,22 and 35, 39 are forbidden and 14 an 43 are the Goal and start node when the program runs.
My question is , How can i double the size of the grid, to 16x16 whilst keeping the Relative position of forbidden tiles as well as the Relative position of start and goal Tiles intact?
On paper i know i can do this by adding 4 rows and columns to all size but in coding terms i don't know how to make it work? Can someone please give any sort of hints?