ShadyPenguin/2048 — pull request #2 by joelevering (2014-04-21 03:11:40+00:00)
Title: Movement and merging working in all directions

I made a pass at extracting the movement and collision logic to one function and wrapping it in direction-specific functions that pass in the appropriate arguments. This IS NOT working perfectly. Sometimes collision isn't detected correctly and the tiles will stop in weird spots or not merge. I think this has to do with the way they're deleted (via splice) from the tiles array since I haven't really looked into that yet.

Pull the branch! LMK what you think. This didn't turn out as clean as I wanted it, but it was an interesting experiment.