Some repetition there, one issue is the loop directions, since tiles need to be merged "down" into the direction being moved.
Some repetition there, one issue is the loop directions, since tiles need to be merged "down" into the direction being moved.