Test-driven 2048 clone in Javascript.