discard instead of prune
ManhattanDistance was also calculating the distance of the empty cell.