News for hackers. Stuff that matters.
Re:Building 2048 in AngularJS by wtfseriously on Tuesday April 08, 2014 @12:43PM (#7554504)
Compared to how the original 2048 is written - which is quite clean - the amount of clones (and the speed of their production) being a testament to that - this is disgustingly, unnecessarily complex.
Re:Building 2048 in AngularJS by timdorr on Tuesday April 08, 2014 @01:01PM (#7554627)
The point isn't to make a clean copy of 2048. The point is to show how you build Angular apps and organize code for something more complex than a simple todo list app.
Re:Building 2048 in AngularJS by visarga on Tuesday April 08, 2014 @01:20PM (#7554735)
Then this is anti-advertising for Angular.
Re:Building 2048 in AngularJS by wwweston on Tuesday April 08, 2014 @03:32PM (#7555461)
Is there a separated-concern library suitable for large applications that'd fare better for 2048?
Re:Building 2048 in AngularJS by mzs on Tuesday April 08, 2014 @05:45PM (#7556219)
Like others have said it's a very good write-up tutorial, I think it must have taken longer to write and edit all the explanatory text than the code itself. Clearly they started before the very early on change to the original 2048 that lets yo keep playing past 2K at least ;)

https://lh3.googleusercontent.com/-rtiXCvTQ2Zo/U0Rr5Zav0yI/A...

And this Angular version doesn't leave graphical debris all over the window in FF on FreeBSD, big win, sort of the reason I turned my awk script that I ran to test strategies for playing the original game well into an interactive game itself ;)

https://news.ycombinator.com/item?id=7471897

Re:Building 2048 in AngularJS by deluvas on Tuesday April 08, 2014 @12:58PM (#7554610)
Yeah, that's exactly what I thought at first, too. But I guess it's just an example on a simple game to show how you'd do more complex applications with Angular.
Re:Building 2048 in AngularJS by duaneb on Tuesday April 08, 2014 @01:00PM (#7554624)
In this case I think it's mostly unnecessarily verbose.