Shortest Path Between Two Points In A Grid Java