Hacker News new | ask | show | jobs
by gu 4380 days ago
I never claimed that the polish of the UI in the original was irrelevant.
2 comments

So, I realize the odds are rather low you will see this. I took a stab at implementing 2048 in javascript. Depending on what you mean by "many more lines," I'm not sure I agree still. For a hardcoded 4x4 grid, I'm only at 100 lines of code in javascript. (For arbitrary rectangular boards, I'm at 130.)

I'm not going to claim that the code alone is as "pretty" as the Haskel version, but I see no reason it should have exploded to be much larger. I may have to take a look at how other folks are doing this.

(Code is currently at https://github.com/taeric/2048-Explorations. Will try to prettify and publish the org file that accompanies it.)

:) Then I am continuing to talk right past you. Apologies.

I'll hopefully have more to add to the conversation after I try this game in a language. At face value, I am not at all clear on how this will take 90 lines of javascript. That just seems extreme.