Fake do-while loop for getFarthestValidCellInDirection