How can I get my character to move within a 3x3 grid?

Hello all,

I was hoping I can get some help getting my character to move in a 3x3 grid, like in Megaman Battle Network. I was able to create the grid generator itself, but cant for the life of me figure out how to get my player to move within the respective grid bounds. How would I go about doing that?


depends how you want it to move, sorry ive not played megaman if thats what you meant

A* or Dijkstra’s Algorithm are good for grid based movement although may be overkill for this.

simplest place to start would be have the grid ‘know’ its neighbor tiles and move from neighbor to neighbor