8-puzzle - Functions not working correctly

changing these from (3,0) to (2,-1)

A three element array has three valid subscripts - 0, 1 or 2.
No negative numbers, no numbers greater than 2.